/* 
 * Ravi Portfolio Main CSS
 * Contains layout and section-specific styling 
 */

/* ==========================================
   Base Elements & Utilities
   ========================================== */
.bg-light {
    background-color: var(--surface-color);
}

.image-placeholder {
    display: none;
}

/* ==========================================
   Header & Navigation
   ========================================== */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(250, 250, 250, 0.85);
    /* fallback */
    background-color: color-mix(in srgb, var(--bg-color) 85%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.main-navigation a:hover,
.main-navigation a.active {
    color: var(--text-primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

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

.hero-bg-animated {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.03) 0%, rgba(250, 250, 250, 0) 50%);
    animation: rotateBg 30s linear infinite;
    z-index: -1;
}

@keyframes rotateBg {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
}

.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-img {
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    object-fit: cover;
    border: 4px solid var(--surface-color);
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 4/5;
    background-color: var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================
   About Section
   ========================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-color);
}

.stat-plus {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
}

.stat-label {
    display: block;
    margin-top: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ==========================================
   Skills Section
   ========================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.skill-category h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.skill-list {
    list-style: none;
}

.skill-list li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.skill-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* ==========================================
   Experience Section
   ========================================== */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15px;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 7px;
    top: 5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-color);
    border: 4px solid var(--bg-color);
}

.timeline-content {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.timeline-company {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.timeline-responsibilities {
    padding-left: 1.2rem;
    color: var(--text-secondary);
}

.timeline-responsibilities li {
    margin-bottom: 0.5rem;
}

/* ==========================================
   Plugins & Projects Section
   ========================================== */
.plugin-grid,
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.plugin-card,
.project-card {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.project-card {
    padding: 0;
    overflow: hidden;
}

.plugin-card:hover,
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.plugin-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.plugin-title,
.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.plugin-category {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.plugin-desc,
.project-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.project-image .image-placeholder {
    aspect-ratio: 16/9;
    border-radius: 0;
}

.project-content {
    padding: 2rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-tech span {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 600;
}

/* ==========================================
   Services Section
   ========================================== */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
}

.service-item {
    background: var(--bg-color);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.service-item:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

/* ==========================================
   Why Work With Me Section
   ========================================== */
.why-me-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.why-card {
    padding: 2rem;
    border-left: 4px solid var(--accent-color);
    background: var(--surface-color);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.why-card h3 {
    margin-bottom: 1rem;
}

.why-card p {
    color: var(--text-secondary);
}

/* ==========================================
   Contact Section
   ========================================== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.contact-info {
    padding: 4rem;
    background: var(--accent-color);
    color: var(--bg-color);
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-info p {
    opacity: 0.8;
    margin-bottom: 3rem;
}

.contact-detail {
    margin-bottom: 1.5rem;
}

.detail-label {
    display: block;
    font-size: 0.875rem;
    opacity: 0.7;
    margin-bottom: 0.25rem;
}

.detail-value {
    font-weight: 600;
    font-size: 1.125rem;
}

.detail-value a {
    color: var(--bg-color);
    text-decoration: none;
    transition: var(--transition);
}

.detail-value a:hover {
    color: var(--surface-color);
    text-decoration: underline;
}

.contact-form-wrapper {
    padding: 4rem;
}

.cf7-placeholder {
    padding: 2rem;
    background: var(--bg-color);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--text-secondary);
}

/* ==========================================
   Hobby Project Section
   ========================================== */
.hobby-section {
    padding-bottom: 6rem;
}

.hobby-wrapper {
    background: var(--accent-color);
    color: var(--bg-color);
    border-radius: var(--radius-lg);
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hobby-text-content {
    padding: 5rem;
    position: relative;
    z-index: 2;
}

.hobby-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: var(--bg-color);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    backdrop-filter: blur(5px);
}

.hobby-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hobby-intro {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 3rem;
    max-width: 500px;
}

.hobby-project-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.hobby-project-box h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.hobby-project-box p {
    opacity: 0.8;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.btn-hobby {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--bg-color);
}

.btn-hobby:hover {
    background: var(--bg-color);
    color: var(--accent-color);
}

.btn-hobby .arrow {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.btn-hobby:hover .arrow {
    transform: translateX(5px);
}

.hobby-visual {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.visual-accent {
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: rotateBg 20s linear infinite;
}

.visual-content {
    position: relative;
    z-index: 2;
    color: rgba(255, 255, 255, 0.2);
    transform: scale(3);
}

/* ==========================================
   Footer
   ========================================== */
.site-footer {
    background: var(--bg-color);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.footer-desc {
    color: var(--text-secondary);
    max-width: 300px;
}

.footer-heading {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
}

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

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: var(--text-secondary);
}

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

.site-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

#back-to-top {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
}

#back-to-top:hover {
    background: var(--accent-color);
    color: var(--surface-color);
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 992px) {

    .hero-container,
    .about-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .hero-content {
        text-align: center;
        order: 1;
    }

    .hero-image {
        order: 2;
    }

    .hero-ctas {
        justify-content: center;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .main-navigation ul {
        display: none;
        /* Add mobile menu toggle logic in JS */
    }

    .menu-toggle {
        display: block;
    }

    .header-cta {
        display: none;
    }

    .contact-wrapper {
        border-radius: var(--radius-md);
    }

    .contact-info,
    .contact-form-wrapper {
        padding: 2rem;
    }

    .detail-value {
        font-size: 1rem;
    }

    .hobby-wrapper {
        grid-template-columns: 1fr;
    }

    .hobby-text-content {
        padding: 3rem 2rem;
    }

    .hobby-title {
        font-size: 2.5rem;
    }

    .hobby-visual {
        min-height: 200px;
    }
}