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

:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #0ea5e9;
    --accent-light: #38bdf8;
    --text-color: #f1f5f9;
    --text-light: #cbd5e1;
    --gray-color: #475569;
    --light-bg: #f8fafc;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-color);
    background-color: var(--primary-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

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

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

section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
}

.btn:hover {
    background-color: var(--accent-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

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

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

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.6rem 0;
    transition: var(--transition);
} 

header.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow);
} 

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

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--accent-color);
}

.logo img, .logo-img {
    height: 60px;
    max-height: 60px;
    width: auto;
    display: block;
} 

/* Ensure navbar stays centered and not stretched by logo */
.navbar {
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.25rem;
} 

.nav-links a {
    position: relative;
    font-weight: 500;
    padding: 0.5rem 0;
}

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

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

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(26, 26, 46, 0.9), rgba(22, 33, 62, 0.9)), 
                url('https://images.unsplash.com/photo-1603516875773-9a4c1861d5ed?q=80&w=1267&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding-top: 72px;
} 

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

/* Hero Header with Photo and Title Side-by-Side */
.hero-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-photo-wrapper {
    flex-shrink: 0;
    position: relative;
    width: 128px;
    height: 128px;
}

.profile-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 4px solid rgba(14, 165, 233, 0.3);
    box-shadow: 
        0 0 0 3px rgba(14, 165, 233, 0.15),
        0 8px 30px rgba(14, 165, 233, 0.2),
        inset 0 0 15px rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(56, 189, 248, 0.05));
    position: relative;
    z-index: 1;
}

.profile-photo:hover {
    transform: translateY(-3px) scale(1.03);
    border-color: rgba(14, 165, 233, 0.5);
    box-shadow: 
        0 0 0 3px rgba(14, 165, 233, 0.25),
        0 12px 40px rgba(14, 165, 233, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.15);
}

/* Subtle outer glow effect */
.profile-photo-wrapper::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
    filter: blur(8px);
    z-index: 0;
    animation: pulseGlow 3s ease-in-out infinite alternate;
    top: 0;
    left: 0;
}

@keyframes pulseGlow {
    0% {
        opacity: 0.3;
        transform: scale(0.95);
    }
    100% {
        opacity: 0.6;
        transform: scale(1.03);
    }
}

.hero-titles {
    flex: 1;
}

.hero-titles h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.hero-titles h2 {
    font-size: 1.8rem;
    color: var(--accent-light);
    margin-bottom: 0;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Hero Buttons - ADDED/CHANGED SECTION */
.hero-btns {
    display: flex;
    gap: 1rem;
    margin-top: 3rem; /* Increased from default to lower the buttons */
    flex-wrap: wrap;
}

.hero-btns .btn {
    margin-top: 0; /* Reset any margin on individual buttons */
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .hero-header {
        gap: 1.8rem;
    }
    
    .profile-photo-wrapper {
        width: 118px;
        height: 118px;
    }
    
    .hero-titles h1 {
        font-size: 3rem;
    }
    
    .hero-titles h2 {
        font-size: 1.5rem;
    }
    
    .hero-btns {
        margin-top: 2.5rem; /* Adjusted for medium screens */
    }
}

@media (max-width: 768px) {
    .hero-header {
        flex-direction: column;
        text-align: center;
        gap: 1.2rem;
    }
    
    .profile-photo-wrapper {
        width: 108px;
        height: 108px;
    }
    
    .hero-titles h1 {
        font-size: 2.5rem;
    }
    
    .hero-titles h2 {
        font-size: 1.3rem;
    }
    
    .hero-btns {
        margin-top: 2rem; /* Adjusted for tablets */
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero-header {
        gap: 1rem;
    }
    
    .profile-photo-wrapper {
        width: 98px;
        height: 98px;
    }
    
    .profile-photo {
        border-width: 3px;
    }
    
    .hero-titles h1 {
        font-size: 2rem;
    }
    
    .hero-titles h2 {
        font-size: 1.1rem;
    }
    
    .hero-btns {
        margin-top: 1.5rem; /* Adjusted for mobile */
        flex-direction: column;
        align-items: center;
    }
    
    .hero-btns .btn {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }
}

/* Projects Section */
.projects {
    background-color: var(--secondary-color);
}

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

.project-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.project-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
    transition: var(--transition);
    flex-shrink: 0;
}

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

.project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
}

.project-content p {
    flex: 1;
    overflow: hidden;
    margin-bottom: 1rem;
    transition: font-size 0.12s ease;
}

.project-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

/* Ensure tags sit above the action and don't affect layout */
.project-footer .project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Boxed action button pinned bottom-left */
.btn.view-details {
    align-self: flex-start;
    background: rgba(255,255,255,0.04);
    color: var(--text-color);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    transition: background 0.18s ease, transform 0.12s ease, color 0.12s ease;
    font-weight: 600;
}

.btn.view-details:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-3px);
}

@media (max-width: 576px) {
    .btn.view-details {
        padding: 0.45rem 0.8rem;
        font-size: 0.95rem;
    }
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.project-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

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

.tag {
    background-color: rgba(14, 165, 233, 0.2);
    color: var(--accent-light);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Contact Section */
.contact {
    background-color: var(--primary-color);
}

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

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

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

.contact-icon {
    background-color: var(--accent-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-details h3 {
    margin-bottom: 0.3rem;
}

.contact-form {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-family: 'Open Sans', sans-serif;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.15);
}

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

/* Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2,6,23,0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 2000;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: linear-gradient(180deg, rgba(10,12,20,0.98), rgba(18,23,38,0.98));
    color: var(--text-color);
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    transform: translateY(8px) scale(0.98);
    transition: transform 0.25s ease, box-shadow 0.2s ease;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.04);
    font-family: 'Open Sans', sans-serif;
}

.modal-overlay.open .modal {
    transform: translateY(0) scale(1);
}

.modal-body {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    align-items: flex-start;
}

.modal-img {
    width: 42%;
    max-width: 360px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.03);
    filter: contrast(0.95) saturate(0.95);
}

.modal-info {
    flex: 1;
}

.modal-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    color: var(--accent-light);
}

.modal-info p {
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 1rem;
}

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

.modal-tags .tag {
    background-color: rgba(255,255,255,0.03);
    color: var(--accent-light);
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.85rem;
    border: 1px solid rgba(14,165,233,0.08);
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: rgba(255,255,255,0.03);
    border: none;
    font-size: 1.6rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px 12px;
    line-height: 1;
    border-radius: 8px;
    transition: background 0.15s ease, transform 0.15s ease;
}

.modal-close:hover {
    background: rgba(14,165,233,0.12);
    transform: translateY(-2px);
    color: #fff;
}

.modal-close:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
        padding: 1rem;
    }
    .modal-img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }
}

/* Footer */
footer {
    background-color: #0f172a;
    padding: 3rem 0 1.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

.copyright {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Go Up Button */
.go-up {
    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;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow);
}

.go-up.visible {
    opacity: 1;
    visibility: visible;
}

.go-up:hover {
    background-color: var(--accent-light);
    transform: translateY(-5px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        flex-direction: column;
        align-items: center;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        box-shadow: var(--shadow);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu-btn {
        display: block;
    }

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

@media (max-width: 576px) {
    .container {
        padding: 0 1.5rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero h2 {
        font-size: 1.2rem;
    }
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }

    /* Slightly smaller logo on very small screens */
    .logo img, .logo-img {
        height: 48px;
        max-height: 48px;
    }
}