/* --- VARIABLES & GLOBAL STYLES --- */
:root {
    --primary-color: #3b82f6; --primary-hover: #2563eb; --secondary-color: #64748b; --text-color: #334155; --text-light: #64748b;
    --heading-color: #1e293b; --bg-color: #f8fafc; --surface-color: #ffffff; --border-color: #e5e7eb;
    --shadow-light: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-medium: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --font-primary: 'Poppins', sans-serif; --font-secondary: 'Inter', sans-serif;
}
.dark-mode {
    --primary-color: #60a5fa; --primary-hover: #93c5fd; --secondary-color: #94a3b8; --text-color: #cbd5e1; --text-light: #94a3b8;
    --heading-color: #f1f5f9; --bg-color: #0f172a; --surface-color: #1e293b; --border-color: #334155;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { background-color: var(--bg-color); color: var(--text-color); font-family: var(--font-secondary); line-height: 1.7; transition: background-color 0.3s, color 0.3s; }
.container { width: 90%; max-width: 1140px; margin: 0 auto; }
.page-section { padding: 6rem 0; overflow-x: hidden; }
#home { padding: 80px 0 0 0; }
.section-title { font-family: var(--font-primary); font-size: 2.8rem; text-align: center; margin-bottom: 4rem; font-weight: 700; color: var(--heading-color); }
a { color: var(--primary-color); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; }

/* --- HEADER --- */
header { background-color: rgba(255, 255, 255, 0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-color); position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; transition: background-color 0.3s, border-color 0.3s, top 0.3s; }
.dark-mode header { background-color: rgba(15, 23, 42, 0.8); }
.header-container { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo { font-size: 1.8rem; font-weight: 700; color: var(--heading-color); font-family: var(--font-primary); }
.main-nav ul { list-style: none; display: flex; gap: 2.5rem; margin: 0; }
.main-nav a { font-weight: 600; font-size: 0.95rem; padding: 5px 0; position: relative; color: var(--text-color); }
.main-nav a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background-color: var(--primary-color); transition: width 0.3s ease; }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.header-right { display: flex; align-items: center; gap: 1rem; }
#theme-toggle, #menu-toggle { background: none; border: none; cursor: pointer; color: var(--text-color); padding: 5px; display: flex; align-items: center; justify-content: center; }
#theme-toggle svg, #menu-toggle svg { width: 24px; height: 24px; }
.dark-mode .sun { display: block; } .dark-mode .moon { display: none; }
.light-mode .sun { display: none; } .light-mode .moon { display: block; }
#menu-toggle { display: none; }

/* --- BUTTONS --- */
.btn { display: inline-block; padding: 14px 32px; border-radius: 50px; font-weight: 600; text-align: center; transition: all 0.3s ease; font-family: var(--font-secondary); letter-spacing: 0.5px; }
.btn-primary { background-color: var(--primary-color); color: white; border: 2px solid var(--primary-color); }
.btn-primary:hover { background-color: var(--primary-hover); border-color: var(--primary-hover); transform: translateY(-3px); box-shadow: 0 10px 20px -10px var(--primary-color); }
.btn-secondary { background-color: transparent; color: var(--primary-color); border: 2px solid var(--primary-color); }
.btn-secondary:hover { background-color: var(--primary-color); color: white; transform: translateY(-3px); }

/* --- HERO SECTION --- */
.hero-section { min-height: 100vh; display: flex; align-items: center; position: relative; padding-bottom: 80px; background: linear-gradient(45deg, #e0f7fa, #e8eaf6, #f3e5f5); animation: gradientBG 15s ease infinite; background-size: 400% 400%; }
.dark-mode .hero-section { background: linear-gradient(45deg, #0c4a6e, #1e1b4b, #4a044e); background-size: 400% 400%; animation: gradientBG 15s ease infinite; }
@keyframes gradientBG { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
.hero-content { display: flex; align-items: center; justify-content: space-between; gap: 3rem; }
.hero-text h1 { font-family: var(--font-primary); font-size: 4rem; line-height: 1.1; margin-bottom: 1rem; color: var(--heading-color); }
.hero-text .tagline { font-size: 1.25rem; margin-bottom: 2.5rem; color: var(--text-light); }
.hero-text .highlight { color: var(--primary-color); font-weight: 600; }
.hero-image img { width: 350px; height: 350px; object-fit: cover; border-radius: 50%; border: 10px solid var(--surface-color); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
.scroll-down-link { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); }
.mouse { width: 25px; height: 40px; border: 2px solid var(--heading-color); border-radius: 20px; position: relative; opacity: 0.7; }
.mouse::before { content: ''; position: absolute; left: 50%; top: 8px; width: 4px; height: 4px; background: var(--heading-color); border-radius: 50%; transform: translateX(-50%); animation: scroll-animation 2s infinite; }
@keyframes scroll-animation { 0% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 15px); } }
.reveal-on-scroll { opacity: 0; transform: translateY(50px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.reveal-on-scroll.visible { opacity: 1; transform: translateY(0); }
.animate-on-load { animation: fadeIn 0.8s 0.2s ease-out forwards; opacity: 0; }
.animate-on-load-delay-1 { animation: fadeIn 0.8s 0.5s ease-out forwards; opacity: 0; }
.animate-on-load-delay-2 { animation: fadeIn 0.8s 0.8s ease-out forwards; opacity: 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* --- PROJECTS & BLOGS --- */
.project-grid, .blog-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 2rem; }
.project-card, .blog-post-preview { background-color: var(--surface-color); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: var(--shadow-light); transition: all 0.3s; display: flex; flex-direction: column; overflow: hidden; }
.project-card:hover, .blog-post-preview:hover { transform: translateY(-10px); box-shadow: var(--shadow-medium); }
.project-image { height: 220px; background-size: cover; background-position: center; }
.card-content { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.card-content h3 { font-family: var(--font-primary); color: var(--heading-color); margin-bottom: 0.5rem; }
.card-content .description { line-height: 1.6; max-height: 77px; overflow: hidden; transition: max-height 0.5s ease-in-out; }
.card-content .description.expanded { max-height: 1000px; }
.btn-read-more-project { background: none; border: none; color: var(--primary-color); font-weight: 600; cursor: pointer; padding: 8px 0; margin-top: 0.5rem; align-self: flex-start; }
.card-content .tech { font-size: 0.9rem; color: var(--text-light); margin-bottom: 0.5rem; margin-top: 1rem; }
.project-links { display: flex; gap: 1rem; margin-top: 1.5rem; }
.project-links .btn-secondary { padding: 8px 18px; }
.pagination-controls { display: none; justify-content: center; align-items: center; gap: 1rem; margin-top: 3rem; }
.pagination-controls button { padding: 10px 20px; }
.pagination-controls button:disabled { background-color: var(--border-color); color: var(--text-light); border-color: var(--border-color); cursor: not-allowed; transform: none; box-shadow: none; }
#project-page-info { font-weight: 600; color: var(--secondary-color); }
.project-card { display: none; }
.blog-post-preview { padding: 2rem; }
.blog-post-preview:hover h3 a { color: var(--primary-color); }
.post-meta { font-size: 0.85rem; color: var(--text-light); margin-bottom: 1rem; }
.btn-read-more { align-self: flex-start; margin-top: 1rem; font-weight: 600; color: var(--primary-color); }
.blog-list .blog-post-preview:nth-child(n+4) { display: none; }
.blog-list.expanded .blog-post-preview { display: block; }
.blog-post-full { padding: 6rem 0; max-width: 800px; margin: auto; }
.blog-post-full h1 { font-family: var(--font-primary); font-size: 3rem; margin-bottom: 0.5rem; color: var(--heading-color); }
.blog-post-full .post-content { margin-top: 2rem; font-size: 1.1rem; line-height: 1.8; }

/* --- ABOUT & ACHIEVEMENTS --- */
.page-section:nth-child(even) { background-color: var(--bg-color); }
.page-section:nth-child(odd) { background-color: var(--surface-color); }
.dark-mode .page-section:nth-child(even) { background-color: var(--bg-color); }
.dark-mode .page-section:nth-child(odd) { background-color: var(--surface-color); }
.about-content { display: flex; gap: 4rem; align-items: flex-start; }
.about-bio, .about-skills { flex: 1; }
.about-bio h3 { font-family: var(--font-primary); color: var(--heading-color); font-size: 1.5rem; margin-bottom: 1rem; }
.skills-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.75rem; padding: 0; }
.skills-list li { background-color: var(--bg-color); border: 1px solid var(--border-color); padding: 8px 18px; border-radius: 20px; font-weight: 600; font-size: 0.9rem; transition: all 0.2s; }
.skills-list li:hover { background-color: var(--primary-color); color: white; border-color: var(--primary-color); }
.achievement-wrapper { max-height: 400px; overflow: hidden; transition: max-height 0.5s ease-in-out; position: relative; }
.achievement-wrapper::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 100px; background: linear-gradient(to top, var(--bg-color), transparent); pointer-events: none; }
.dark-mode .achievement-wrapper::after { background: linear-gradient(to top, var(--surface-color), transparent); }
.achievement-wrapper.expanded { max-height: 10000px; }
.achievement-wrapper.expanded::after { display: none; }
.achievement-list { max-width: 800px; margin: 0 auto; }
.achievement-item { background-color: var(--surface-color); padding: 1.5rem 2rem; border-radius: 8px; border-left: 4px solid var(--primary-color); margin-bottom: 1.5rem; box-shadow: var(--shadow-light); transition: box-shadow 0.3s; }
.achievement-item:hover { box-shadow: var(--shadow-medium); }
.achievement-item h3 { font-family: var(--font-primary); font-size: 1.25rem; color: var(--heading-color); margin-bottom: 0.5rem; }
.expand-button-container { text-align: center; margin-top: 2rem; }
.expand-button { background-color: var(--surface-color); color: var(--text-color); border: 1px solid var(--border-color); padding: 10px 24px; border-radius: 50px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s; }
.dark-mode .expand-button { background-color: var(--bg-color); }
.expand-button:hover { border-color: var(--primary-color); color: var(--primary-color); }
.expand-button .arrow { width: 18px; height: 18px; transition: transform 0.3s ease; }
.expanded .arrow { transform: rotate(180deg); }

/* --- TESTIMONIALS --- */
.testimonial-carousel { position: relative; max-width: 720px; margin: 0 auto; padding: 0 40px; }
.carousel-inner { display: flex; transition: transform 0.5s ease; }
.testimonial-item { min-width: 100%; background-color: var(--surface-color); padding: 3rem; border-radius: 12px; text-align: center; }
.testimonial-item .quote { font-size: 1.25rem; font-style: italic; margin-bottom: 1.5rem; line-height: 1.6; color: var(--heading-color); }
.testimonial-item .author { font-weight: 600; color: var(--text-light); }
.carousel-control { position: absolute; top: 50%; transform: translateY(-50%); background-color: var(--surface-color); color: var(--text-color); border: 1px solid var(--border-color); border-radius: 50%; width: 45px; height: 45px; font-size: 1.5rem; cursor: pointer; transition: all 0.2s; box-shadow: var(--shadow-light); }
.carousel-control:hover { background-color: var(--primary-color); color: white; border-color: var(--primary-color); }
.prev { left: 0; } .next { right: 0; }

/* --- CONTACT FORM --- */
.contact-container { display: flex; gap: 3rem; background-color: var(--surface-color); padding: 2rem; border-radius: 12px; }
.contact-form, .contact-info { flex: 1; min-width: 0; }
.contact-info h3 { font-family: var(--font-primary); color: var(--heading-color); font-size: 1.5rem; margin-bottom: 1rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.form-group input, .form-group textarea { width: 100%; padding: 14px; border-radius: 8px; border: 1px solid var(--border-color); background-color: var(--bg-color); color: var(--text-color); transition: border-color 0.2s, box-shadow 0.2s; font-family: var(--font-secondary); font-size: 1rem; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
.contact-info ul { list-style: none; margin-top: 1rem; padding: 0; } .contact-info li { margin-bottom: 1.5rem; }
.form-success, .form-error { border-radius: 8px; padding: 1.5rem; text-align: center; }
.form-success { background-color: #dcfce7; color: #166534; border: 1px solid #86efac; }
.form-error { background-color: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.info-message { text-align: center; width: 100%; color: var(--secondary-color); font-size: 1.1rem; }

/* --- FOOTER --- */
footer { background-color: var(--surface-color); border-top: 1px solid var(--border-color); text-align: center; padding: 2.5rem 0; }
.social-icons { margin-bottom: 1rem; }
.social-icons a, .social-icons-contact a { margin: 0 0.75rem; display: inline-block; }
.social-icons img, .social-icons-contact img { width: 28px; height: 28px; filter: grayscale(100%) contrast(0%) brightness(1.5); opacity: 0.6; transition: all 0.3s ease; }
.dark-mode .social-icons img, .dark-mode .social-icons-contact img { filter: invert(1) grayscale(100%) brightness(2); }
.social-icons img:hover, .social-icons-contact img:hover { filter: none; opacity: 1; transform: translateY(-3px); }
.social-icons-contact { margin-top: 1.5rem; }

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .hero-content { flex-direction: column-reverse; text-align: center; }
    .hero-image img { width: 300px; height: 300px; }
    .about-content, .contact-container { flex-direction: column; }
}
@media (max-width: 768px) {
    body { font-size: 16px; }
    html { scroll-padding-top: 70px; }
    #home { padding-top: 70px; }
    .header-container { height: 70px; }
    .main-nav { position: fixed; top: 70px; left: -100%; width: 100%; height: calc(100vh - 70px); background-color: var(--bg-color); flex-direction: column; padding-top: 2rem; transition: left 0.3s ease-in-out; }
    .main-nav.active { left: 0; }
    .main-nav ul { flex-direction: column; align-items: center; gap: 1.5rem; }
    .main-nav a { font-size: 1.2rem; }
    #menu-toggle { display: flex; }
    .hero-content { padding-top: 2rem; }
    .hero-text h1 { font-size: 2.8rem; }
    .hero-text p { font-size: 1.1rem; }
    .hero-image img { width: 250px; height: 250px; }
    .section-title { font-size: 2.2rem; }
    .project-grid, .blog-list { grid-template-columns: 1fr; }
    .contact-container { padding: 1.5rem; }
    .testimonial-carousel { padding: 0; }
    /* THIS IS THE LINE THAT IS RE-ADDED */
    /*.testimonial-carousel .carousel-control { display: none; }*/
    .pagination-controls { flex-direction: column; gap: 1.5rem; }
	.scroll-down-link { display: none; }
}