/* ===================================================
   SOHAM DESHPANDE — PORTFOLIO STYLESHEET
   =================================================== */

/* CSS Variables for theming */
:root {
    --bg-color: #fafafa;
    --text-color: #333;
    --text-muted: #666;
    --text-light: #aaa;
    --heading-color: #2c3e50;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-bg-solid: #ffffff;
    --card-shadow: rgba(0, 0, 0, 0.08);
    --card-shadow-hover: rgba(0, 0, 0, 0.15);
    --border-color: #e8e8e8;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --accent-color: #ffd700;
    --link-color: #555;
    --link-hover: #2c3e50;
    --footer-bg: #1a1a2e;
    --footer-text: #ecf0f1;
    --footer-link-hover: #ffd700;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --section-alt-bg: #f0f2ff;
}

body.dark-mode {
    --bg-color: #0f0f1a;
    --text-color: #e8e8f0;
    --text-muted: #a0a0b8;
    --text-light: #ccc;
    --heading-color: #e8e8f0;
    --card-bg: rgba(30, 30, 50, 0.85);
    --card-bg-solid: #1e1e32;
    --card-shadow: rgba(0, 0, 0, 0.3);
    --card-shadow-hover: rgba(0, 0, 0, 0.5);
    --border-color: #2a2a45;
    --gradient-start: #7c5cbf;
    --gradient-end: #667eea;
    --link-color: #a0a0b8;
    --link-hover: #fff;
    --footer-bg: #0a0a14;
    --footer-text: #b0b0c0;
    --footer-link-hover: #ffd700;
    --glass-bg: rgba(15, 15, 30, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
    --section-alt-bg: #151528;
}

/* ===================================================
   RESET & BASE
   =================================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

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

/* ===================================================
   HEADER & NAVIGATION — Glassmorphism
   =================================================== */

.header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background 0.4s ease, border-color 0.4s ease;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading-color);
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: -0.02em;
}

body.dark-mode .logo {
    color: var(--accent-color);
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--link-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    border-radius: 2px;
    transition: width 0.3s ease;
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--heading-color);
}

body.dark-mode .nav-link:hover,
body.dark-mode .nav-link.active {
    color: #fff;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2.5px;
    background-color: var(--heading-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

body.dark-mode .hamburger span {
    background-color: #e0e0e0;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===================================================
   HERO SECTION
   =================================================== */

.hero {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    text-align: center;
    padding: 14rem 2rem 10rem;
    position: relative;
    overflow: hidden;
}

/* Floating shapes for depth */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    animation: floatShape 8s ease-in-out infinite;
}

.hero::before {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.hero::after {
    width: 300px;
    height: 300px;
    bottom: -80px;
    left: -80px;
    animation-delay: 4s;
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(20px, 20px) scale(1.02); }
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 1;
}

.highlight {
    color: var(--accent-color);
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.35rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

/* Typing cursor */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: rgba(255, 255, 255, 0.8);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

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

.hero-cta {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* ===================================================
   BUTTONS
   =================================================== */

.btn {
    display: inline-block;
    padding: 0.85rem 2.25rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    letter-spacing: 0.01em;
}

.btn-primary {
    background-color: white;
    color: var(--gradient-start);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn-secondary:hover {
    background-color: white;
    color: var(--gradient-start);
    border-color: white;
    transform: translateY(-3px);
}

body.dark-mode .btn-primary {
    background: linear-gradient(135deg, #1e1e32, #2a2a45);
    color: var(--gradient-end);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .btn-primary:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

/* Contact form submit button — needs special styling */
.contact-form .btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    width: 100%;
    padding: 1rem;
    font-size: 1.05rem;
}

.contact-form .btn-primary:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
}

/* ===================================================
   SECTIONS
   =================================================== */

.section {
    padding: 7rem 2rem;
    background-color: var(--bg-color);
    transition: background-color 0.4s ease;
}

.section-alt {
    background-color: var(--section-alt-bg);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3.5rem;
    color: var(--heading-color);
    position: relative;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ===================================================
   SCROLL REVEAL ANIMATIONS
   =================================================== */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ===================================================
   ABOUT SECTION
   =================================================== */

.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.8;
}

/* ===================================================
   EDUCATION SECTION
   =================================================== */

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

.education-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--gradient-start), var(--gradient-end));
    margin-left: 30px;
    left: 0;
    border-radius: 3px;
}

.education-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding-left: 65px;
}

.education-item::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 50%;
    top: 6px;
    left: 23px;
    border: 3px solid var(--bg-color);
    box-shadow: 0 0 0 3px var(--gradient-start);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.education-content h3 {
    color: var(--heading-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.education-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.education-content p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===================================================
   SKILLS SECTION — Glassmorphism Cards
   =================================================== */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.skill-category {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.75rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.4s ease;
}

.skill-category:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px var(--card-shadow-hover);
}

.skill-category h3 {
    color: var(--heading-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    color: var(--gradient-start);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.skill-tag:hover {
    transform: translateY(-2px) scale(1.05);
    border-color: var(--gradient-start);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

body.dark-mode .skill-tag {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    color: #a8b4f0;
}

/* ===================================================
   PROJECTS SECTION
   =================================================== */

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

.project-card {
    background: var(--card-bg-solid);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--card-shadow);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s ease,
                background-color 0.4s ease;
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    padding: 2px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px var(--card-shadow-hover);
}

.project-card:hover::before {
    opacity: 1;
}

.project-card-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-card-image img {
    transform: scale(1.05);
}

.project-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.05), rgba(0,0,0,0.25));
    pointer-events: none;
}

/* Logo-style images (e.g. InfraNova) — contain instead of cover */
.project-card-image img.project-logo {
    object-fit: contain;
    padding: 1.5rem;
    background: white;
}

body.dark-mode .project-card-image img.project-logo {
    background: #1a1a2e;
}

/* Fallback icon for projects without images */
.project-card-icon {
    font-size: 4rem;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.project-title {
    font-size: 1.3rem;
    margin: 1.5rem 1.5rem 0.75rem;
    color: var(--heading-color);
    font-weight: 700;
}

.project-description {
    color: var(--text-muted);
    margin: 0 1.5rem 1.5rem;
    line-height: 1.7;
    font-size: 0.95rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 1.5rem 1rem;
}

.project-tag {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    color: var(--gradient-start);
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

body.dark-mode .project-tag {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    color: #a8b4f0;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 1.5rem 1.5rem;
    color: var(--gradient-start);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease, gap 0.3s ease;
}

.project-link:hover {
    color: var(--gradient-end);
    gap: 0.7rem;
}

/* ===================================================
   CONTACT SECTION
   =================================================== */

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gradient-start);
    flex-shrink: 0;
}

.contact-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--gradient-start);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.dark-mode .contact-icon {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
}

.contact-item-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.contact-item-text strong {
    color: var(--heading-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.contact-item-text a,
.contact-item-text p {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.contact-item-text a:hover {
    color: var(--gradient-start);
}

.contact-form {
    background: var(--card-bg-solid);
    padding: 2.5rem;
    border-radius: 18px;
    box-shadow: 0 4px 20px var(--card-shadow);
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.9rem 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s ease, background-color 0.4s ease, box-shadow 0.3s ease;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--gradient-start);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-light);
}

/* ===================================================
   FOOTER
   =================================================== */

.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 3rem 2rem;
    transition: background-color 0.4s ease;
}

.footer p {
    font-size: 0.95rem;
    opacity: 0.8;
}

.footer-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-link {
    color: var(--footer-text);
    text-decoration: none;
    padding: 0.25rem 0.75rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    opacity: 0.7;
}

.footer-link:hover {
    color: var(--footer-link-hover);
    opacity: 1;
}

/* ===================================================
   DARK MODE THEME TOGGLE
   =================================================== */

.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: all 0.3s ease;
    margin-left: 0.75rem;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-color: transparent;
    transform: rotate(15deg) scale(1.1);
}

.theme-toggle:hover .theme-icon {
    filter: brightness(10);
}

body.dark-mode .theme-toggle {
    border-color: #3a3a55;
}

/* ===================================================
   RESPONSIVE DESIGN
   =================================================== */

@media (max-width: 768px) {
    /* Hamburger visible */
    .hamburger {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--card-bg-solid);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
        z-index: 999;
    }

    .nav.open {
        right: 0;
    }

    .nav-link {
        font-size: 1.15rem;
    }

    .hero {
        padding: 10rem 1.5rem 6rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

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

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .section {
        padding: 5rem 1.5rem;
    }

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

    .contact-content {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
    }
}

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

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

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

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================================
   MOBILE NAV OVERLAY
   =================================================== */

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}