/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Montserrat:wght@400;600;800&display=swap');

/* CSS Variables */
:root {
    /* Light Mode */
    --primary-color: #2d3436;
    --secondary-color: #636e72;
    --accent-color: #6c5ce7;
    --accent-hover: #a29bfe;
    --bg-color: #fafafa;
    --surface-color: #ffffff;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --border-color: #dfe6e9;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --paper-texture: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="0.04"/></svg>');
    --transition-fast: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

[data-theme="dark"] {
    /* Dark Mode */
    --primary-color: #f5f6fa;
    --secondary-color: #b2bec3;
    --accent-color: #a29bfe;
    --accent-hover: #6c5ce7;
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --border-color: #2d3436;
    --nav-bg: rgba(18, 18, 18, 0.85);
    --paper-texture: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="0.02"/></svg>');
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    transition: background-color var(--transition-fast), color var(--transition-fast);
    position: relative;
    overflow-x: hidden;
}

/* Paper Texture Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: var(--paper-texture);
    z-index: 9999;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

/* Typography Utilities */
.text-center { text-align: center; }
.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}
.section-subtitle {
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    max-width: 600px;
    margin-inline: auto;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.section {
    padding: 6rem 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
}

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

.btn-outline:hover {
    background: var(--accent-color);
    color: #fff;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: all var(--transition-fast);
    background: transparent;
}

.navbar.scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-dot {
    width: 10px;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: inline-block;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: width var(--transition-fast);
}

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

.theme-toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: -10%;
    right: -5%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
    opacity: 0.1;
    border-radius: 50%;
    z-index: -1;
    filter: blur(60px);
}

.hero-content {
    max-width: 800px;
    padding: 20px;
}

.hero-subtitle {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(108, 92, 231, 0.1);
    color: var(--accent-color);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero h1 span {
    color: var(--accent-color);
    position: relative;
    display: inline-block;
}

.hero h1 span::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    height: 15px;
    background: var(--accent-color);
    opacity: 0.2;
    z-index: -1;
}

.hero p {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

/* Cards (Services) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background: var(--surface-color);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    opacity: 0.05;
    z-index: -1;
    transition: height var(--transition-slow);
}

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

.service-card:hover::before {
    height: 100%;
}

.service-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    display: inline-block;
    padding: 15px;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 15px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

/* Portfolio Filters and Grid */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 24px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    color: var(--primary-color);
    transition: all var(--transition-fast);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.portfolio-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 18, 18, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
    padding: 20px;
    text-align: center;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    color: #fff;
    margin-bottom: 5px;
    transform: translateY(20px);
    transition: transform var(--transition-fast);
}

.portfolio-overlay span {
    color: var(--accent-color);
    font-size: 0.9rem;
    transform: translateY(20px);
    transition: transform var(--transition-fast) 0.1s;
}

.portfolio-item:hover .portfolio-overlay h3,
.portfolio-item:hover .portfolio-overlay span {
    transform: translateY(0);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    backdrop-filter: blur(5px);
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--surface-color);
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    position: relative;
    transform: translateY(-20px);
    transition: transform var(--transition-fast);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
    border: none;
    background: none;
}

/* Lightbox specific */
.lightbox-content {
    background: transparent;
    box-shadow: none;
    max-width: 90%;
    max-height: 90%;
    padding: 0;
}
.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Testimonials */
.testimonials-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    padding: 20px 0;
}

.testimonial-track {
    display: flex;
    transition: transform var(--transition-slow);
}

.testimonial-slide {
    min-width: 100%;
    padding: 0 20px;
    text-align: center;
}

.testimonial-card {
    background: var(--surface-color);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.testial-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    opacity: 0.5;
}

.testimonial-text {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-color);
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.slider-dot.active {
    background: var(--accent-color);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--surface-color);
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* About Page Specific */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.about-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    box-shadow: inset 0 0 0 10px rgba(255,255,255,0.1);
    pointer-events: none;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--border-color);
}

.timeline-item {
    margin-bottom: 40px;
    position: relative;
    width: 50%;
    padding-right: 40px;
}

.timeline-item:nth-child(even) {
    margin-left: 50%;
    padding-right: 0;
    padding-left: 40px;
}

.timeline-dot {
    position: absolute;
    top: 0;
    right: -8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-color);
    border: 3px solid var(--bg-color);
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -8px;
    right: auto;
}

.timeline-content {
    background: var(--surface-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

/* Progress Bars */
.skills-container {
    margin-top: 40px;
}

.skill-item {
    margin-bottom: 20px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    border-radius: 4px;
    width: 0; /* Animated via JS */
    transition: width 1.5s ease;
}

/* CTA Banner */
.cta-banner {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    padding: 80px 0;
    color: #fff;
    text-align: center;
    border-radius: 30px;
    margin: 60px 20px;
    position: relative;
    overflow: hidden;
}

.cta-banner h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-banner p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-banner .btn-primary {
    background: #fff !important;
    color: var(--accent-color) !important;
}

.cta-banner .btn-primary:hover {
    background: var(--bg-color) !important;
}

/* Footer */
.footer {
    background: var(--surface-color);
    padding: 80px 0 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-col p, .footer-col li {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.footer-links li a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(108, 92, 231, 0.1);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.social-icon:hover {
    background: var(--accent-color);
    color: #fff;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Scroll Reveal Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Contact Page Form Status */
.status-message {
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    display: none;
}
.status-success {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid #2ecc71;
    display: block;
}

/* Responsive */
@media (max-width: 992px) {
    .hero h1 { font-size: 3.5rem; }
    .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--surface-color);
        flex-direction: column;
        justify-content: center;
        transition: right var(--transition-fast);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .mobile-menu-btn {
        display: block;
        z-index: 1001;
    }
    
    .hero h1 { font-size: 2.5rem; }
    .timeline::before { left: 20px; }
    .timeline-item { width: 100%; padding-left: 50px !important; margin-left: 0 !important; }
    .timeline-dot { left: 12px !important; }
}
