/* ========================================
   Variables & Reset
   ======================================== */

:root {
    --primary-color: #0d47a1;
    --secondary-color: #1565c0;
    --accent-color: #ff6f00;
    --text-dark: #212121;
    --text-light: #757575;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ========================================
   Navigation
   ======================================== */

.navbar {
    position: sticky;
    top: 0;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.navbar-brand .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.navbar-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: var(--primary-color);
}

.navbar-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%);
    color: var(--bg-white);
    padding: 60px 20px;
}

.hero-background {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    animation: slideInDown 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    animation: slideInUp 0.8s ease-out 0.2s both;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: slideInUp 0.8s ease-out 0.4s both;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: slideInUp 0.8s ease-out 0.6s both;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: #e65100;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--bg-white);
    border: 2px solid var(--bg-white);
}

.btn-secondary:hover {
    background-color: var(--bg-white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* ========================================
   About Section
   ======================================== */

.about {
    padding: 80px 20px;
    background-color: var(--bg-light);
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

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

.feature-card {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ========================================
   Services Section
   ======================================== */

.services {
    padding: 80px 20px;
    background-color: var(--bg-white);
}

.services h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

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

.service-card {
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ========================================
   Contact Section
   ======================================== */

.contact {
    padding: 80px 20px;
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%);
    color: var(--bg-white);
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-form,
.contact-info {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.contact-form h3,
.contact-info h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* ========================================
   Form Styles
   ======================================== */

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
}

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

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    display: none;
}

.form-message.success {
    display: block;
    background-color: #4caf50;
    color: var(--bg-white);
}

.form-message.error {
    display: block;
    background-color: #f44336;
    color: var(--bg-white);
}

/* ========================================
   Contact Info
   ======================================== */

.contact-info p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.contact-info a {
    color: #ffb74d;
    text-decoration: none;
    transition: var(--transition);
}

.contact-info a:hover {
    text-decoration: underline;
}

.related-projects {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.related-projects h4 {
    margin-bottom: 1rem;
}

.related-projects ul {
    list-style: none;
}

.related-projects li {
    margin-bottom: 0.5rem;
}

.related-projects a {
    color: #ffb74d;
    text-decoration: none;
}

.related-projects a:hover {
    text-decoration: underline;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background-color: #1a1a1a;
    color: #eceff1;
    padding: 60px 20px 20px;
}

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

.footer-section h4 {
    color: var(--bg-white);
    margin-bottom: 1rem;
}

.footer-section p {
    color: #bdbdbd;
    line-height: 1.8;
}

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

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdbdbd;
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bdbdbd;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: #bdbdbd;
    text-decoration: none;
}

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

/* ========================================
   Page Header (Portfolio)
   ======================================== */

.page-header {
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%);
    color: var(--bg-white);
    padding: 60px 20px;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* ========================================
   Portfolio Section
   ======================================== */

.portfolio {
    padding: 80px 20px;
    background-color: var(--bg-white);
}

.portfolio h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

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

.portfolio-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.portfolio-image {
    width: 100%;
    height: 200px;
    background-color: var(--bg-light);
    overflow: hidden;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
}

.placeholder-image svg {
    width: 100%;
    height: 100%;
}

.portfolio-content {
    padding: 2rem;
}

.portfolio-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.portfolio-card p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.portfolio-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tech-tag {
    display: inline-block;
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ========================================
   Skills Section
   ======================================== */

.skills {
    padding: 80px 20px;
    background-color: var(--bg-light);
}

.skills h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

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

.skill-item {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.skill-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

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

.skill-item li {
    padding: 0.5rem 0;
    color: var(--text-light);
    padding-left: 1.5rem;
    position: relative;
}

.skill-item li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* ========================================
   CTA Section
   ======================================== */

.cta-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, #ff6f00 0%, #e65100 100%);
    color: var(--bg-white);
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .navbar-menu {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--bg-white);
        gap: 0;
        padding: 1rem;
        box-shadow: var(--shadow-md);
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-menu li {
        border-bottom: 1px solid var(--border-color);
        padding: 0.5rem 0;
    }

    .navbar-menu li:last-child {
        border-bottom: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .hero {
        min-height: 400px;
        padding: 40px 20px;
    }

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

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

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
    }

    .about h2,
    .services h2,
    .portfolio h2,
    .skills h2,
    .cta-section h2 {
        font-size: 2rem;
    }

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

    .features-grid,
    .services-grid,
    .portfolio-grid,
    .skills-grid,
    .footer-content {
        grid-template-columns: 1fr;
    }

    .about,
    .services,
    .portfolio,
    .skills,
    .contact,
    .cta-section {
        padding: 60px 20px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .hero-background {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 480px) {
    .navbar .container {
        padding: 1rem 15px;
    }

    .navbar-brand .logo {
        font-size: 1.2rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

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

    .hero-description {
        font-size: 0.95rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .about h2,
    .services h2,
    .portfolio h2,
    .skills h2,
    .contact h2,
    .cta-section h2 {
        font-size: 1.5rem;
    }

    .about,
    .services,
    .portfolio,
    .skills,
    .contact,
    .cta-section {
        padding: 40px 15px;
    }

    .page-header {
        padding: 40px 15px;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }
}

/* ========================================
   Accessibility
   ======================================== */

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
