/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #fafafa;
    font-size: 16px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: transparent;
    border: none;
    position: static;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0 1rem 0;
    position: relative;
}

.logo {
    font-size: 3rem;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
    outline: none;
}

.logo:hover {
    color: #333333;
}

.logo:focus {
    outline: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    outline: none;
}

.nav-link:hover {
    color: #333333;
}

.nav-link:focus {
    outline: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #333333;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    transition: transform 0.3s ease;
    z-index: 1001;
}

.mobile-menu-toggle:focus {
    outline: none;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #2c3e50;
    margin: 3px 0;
    transition: 0.3s;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation Menu */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        border-radius: 12px;
        margin-top: 1rem;
        gap: 1.5rem;
        z-index: 1000;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-link {
        font-size: 1.2rem;
        padding: 0.5rem 0;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-link::after {
        display: none;
    }
}

/* Enhanced navbar */
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Main Content */
.main-content {
    margin-top: 0;
    min-height: 100vh;
}

/* Hero Section */
.hero-section {
    padding: 2rem 0 4rem 0;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    min-height: calc(100vh - 120px);
    justify-content: center;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.25rem;
    color: #7f8c8d;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-text {
    font-size: 1.1rem;
    color: #34495e;
    line-height: 1.8;
}

.hero-text p {
    margin-bottom: 1rem;
}

.inline-links {
    display: inline-flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

/* Improved Contact Links - Inline Links */
.inline-link {
    color: #333333;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: white;
    border: 2px solid #333333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    outline: none;
}

.inline-link:hover {
    color: white;
    background: #333333;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.inline-link:active {
    background: #000000;
    border-color: #000000;
    transform: translateY(0);
    outline: none;
}

.inline-link:focus {
    outline: none;
}

/* Hero Actions */
.hero-actions {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.cta-block {
    background: linear-gradient(135deg, #333333, #000000);
    border-radius: 12px;
    padding: 1px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.cta-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.cta-block:focus {
    outline: none;
}

.cta-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 11px;
    text-decoration: none;
    color: #333333;
    font-weight: 600;
    transition: all 0.3s ease;
    outline: none;
    border: none;
}

.cta-link:hover {
    background: #333333;
    color: white;
}

.cta-link:focus {
    outline: none;
}

.cta-link:active {
    outline: none;
}

.arrow-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.cta-link:hover .arrow-icon {
    transform: translateX(4px);
}

/* Improved Social Contact Links */
.social-block {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: white;
    border: 2px solid #333333;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    outline: none;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.social-link:hover::before {
    left: 100%;
}

.social-link:hover {
    background: #333333;
    border-color: #333333;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.social-link:active {
    background: #000000;
    border-color: #000000;
    transform: translateY(-1px);
    outline: none;
}

.social-link:focus {
    outline: none;
}

.social-icon {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
    filter: brightness(0) saturate(100%);
}

.social-link:hover .social-icon {
    filter: brightness(0) saturate(100%) invert(1);
    transform: scale(1.1);
}

/* Contact Section Specific Styles */
.contact-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: white;
    color: #333333;
    text-decoration: none;
    border: 2px solid #333333;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    outline: none;
}

.contact-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #333333;
    transition: left 0.3s ease;
    z-index: -1;
}

.contact-link:hover::before {
    left: 0;
}

.contact-link:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.contact-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    outline: none;
}

.contact-link:focus {
    outline: none;
}

.contact-link:active::before {
    background: #000000;
}

.contact-icon {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.contact-link:hover .contact-icon {
    transform: scale(1.1);
}

/* About Section */
.about-section {
    padding: 2rem 0 4rem 0;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    min-height: calc(100vh - 120px);
    justify-content: center;
}

.about-content {
    max-width: 800px;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.about-text {
    font-size: 1.1rem;
    color: #34495e;
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-actions {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Gallery Section */
.gallery-section {
    padding: 2rem 0 4rem 0;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    min-height: calc(100vh - 120px);
    justify-content: center;
    align-items: center;
    text-align: center;
}

.gallery-content {
    max-width: 600px;
}

.gallery-title {
    font-size: 3rem;
    font-weight: 700;
    color: #7f8c8d;
    margin-bottom: 2rem;
}

.gallery-actions {
    display: flex;
    justify-content: center;
}

.secondary-block {
    background: white;
    border: 2px solid #333333;
    border-radius: 12px;
    transition: all 0.3s ease;
    outline: none;
}

.secondary-block:hover {
    border-color: #333333;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    background: #333333;
}

.secondary-block:focus {
    outline: none;
}

.secondary-link {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #333333;
    font-weight: 600;
    transition: color 0.3s ease;
    outline: none;
}

.secondary-link:hover {
    color: white;
}

.secondary-link:focus {
    outline: none;
}

.secondary-link:active {
    outline: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .logo {
        font-size: 2.5rem;
    }

    .navbar-content {
        padding: 1.5rem 0 1rem 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .hero-text {
        font-size: 1rem;
    }

    .about-text {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .inline-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .contact-links {
        flex-direction: column;
        gap: 1rem;
    }

    .container {
        padding: 0 15px;
    }

    .hero-section,
    .about-section,
    .gallery-section {
        padding: 1rem 0 2rem 0;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .gallery-title {
        font-size: 2rem;
    }

    .cta-link {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .social-link {
        width: 44px;
        height: 44px;
    }

    .social-icon {
        width: 20px;
        height: 20px;
    }

    .nav-link {
        font-size: 1rem;
    }

    .contact-link {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background: rgba(51, 51, 51, 0.2);
    color: #000000;
}

/* Focus styles for accessibility */
a:focus,
button:focus {
    outline: 2px solid #333333;
    outline-offset: 2px;
}

/* Contact Section */
.contact-section {
    padding: 2rem 0 4rem 0;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    min-height: calc(100vh - 120px);
    justify-content: center;
}

.contact-content {
    max-width: 800px;
}

.contact-text {
    font-size: 1.1rem;
    color: #34495e;
    line-height: 1.8;
    margin-bottom: 3rem;
}

.contact-text p {
    margin-bottom: 1.5rem;
}

.contact-methods {
    margin-bottom: 3rem;
}

/* Contact Form Section */
.contact-form-section {
    margin-top: 3rem;
    max-width: 600px;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.form-input,
.form-textarea {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    outline: none;
}

.form-input:focus,
.form-textarea:focus {
    border-color: #333333;
    box-shadow: 0 0 0 3px rgba(51, 51, 51, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: #333333;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    margin-top: 1rem;
}

.form-submit:hover {
    background: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.form-submit:active {
    transform: translateY(0);
}

.form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-status {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
}

.form-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.submit-icon {
    width: 18px;
    height: 18px;
}

/* Projects Section */
.projects-section {
    padding: 2rem 0 4rem 0;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    min-height: calc(100vh - 120px);
}

.projects-content {
    max-width: 1000px;
}

.projects-text {
    font-size: 1.1rem;
    color: #34495e;
    line-height: 1.8;
    margin-bottom: 3rem;
}

.projects-text p {
    margin-bottom: 1.5rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    border-color: #333333;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.project-card.featured {
    border-color: #333333;
    background: linear-gradient(135deg, #fafafa, white);
}

.project-card.featured::before {
    content: 'Featured';
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #333333;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.project-header {
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: #f0f0f0;
    color: #333333;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.project-description {
    margin-bottom: 1.5rem;
}

.project-description p {
    color: #7f8c8d;
    line-height: 1.6;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
}

.project-link.primary {
    background: #333333;
    color: white;
    border: 2px solid #333333;
}

.project-link.primary:hover {
    background: #000000;
    border-color: #000000;
    transform: translateY(-2px);
}

.project-link.secondary {
    background: white;
    color: #333333;
    border: 2px solid #333333;
}

.project-link.secondary:hover {
    background: #333333;
    color: white;
    transform: translateY(-2px);
}

.link-icon {
    width: 16px;
    height: 16px;
}

/* GitHub Section */
.github-section {
    margin-top: 2rem;
}

.github-card {
    background: linear-gradient(135deg, #333333, #000000);
    color: white;
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.github-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.github-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.github-logo {
    width: 32px;
    height: 32px;
}

.github-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.github-card p {
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: white;
    color: #333333;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.github-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.external-icon {
    width: 16px;
    height: 16px;
}

.projects-actions {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* Contact Actions */
.contact-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 2rem;
}

/* Responsive Design for New Pages */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        padding: 1.5rem;
    }

    .project-links {
        flex-direction: column;
    }

    .project-link {
        justify-content: center;
    }

    .github-card {
        padding: 2rem 1.5rem;
    }

    .github-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .contact-form-section {
        max-width: 100%;
    }

    .contact-links {
        flex-direction: column;
        gap: 1rem;
    }

    .form-submit {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .project-card.featured::before {
        top: 0.75rem;
        right: 0.75rem;
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

    .project-title {
        font-size: 1.1rem;
    }

    .github-card {
        padding: 1.5rem 1rem;
    }

    .github-header h3 {
        font-size: 1.25rem;
    }

    .github-logo {
        width: 24px;
        height: 24px;
    }

    .form-title {
        font-size: 1.25rem;
    }
}
