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

:root {
    --primary-color: #0052cc;
    --primary-dark: #003d99;
    --secondary-color: #121220;
    --accent-color: #00a9cc;
    --background: #e8eaed;
    --surface: #f5f7fa;
    --text-primary: #121220;
    --text-secondary: #525252;
    --border-color: #b8bbbc;
    --success-color: #0d9468;
    --error-color: #be3636;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--text-primary);
    background-color: var(--background);
    line-height: 1.6;
}

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

/* Navigation */
.navbar {
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary-color);
}

.logo-icon {
    color: var(--primary-color);
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

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

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #181f2e 100%);
    padding: 80px 20px;
    color: white;
}

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

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    font-weight: 300;
}

.hero-image {
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.hero-visual {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-svg {
    width: 100%;
    max-width: 400px;
    height: auto;
}

/* CTA Button */
.cta-button {
    display: inline-block;
    padding: 14px 36px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 82, 204, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 82, 204, 0.4);
}

.cta-button.secondary {
    background: var(--primary-color);
}

/* Services Preview */
.services-preview {
    padding: 80px 20px;
    background: var(--surface);
}

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

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

.service-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 82, 204, 0.15);
    border-color: var(--primary-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(0, 82, 204, 0.1), rgba(0, 212, 255, 0.1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    transform: scale(1.1);
}

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

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

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

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

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

/* Services Page */
.services-page {
    padding: 80px 20px;
}

.services-page h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.page-intro {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.services-detailed {
    display: grid;
    gap: 3rem;
}

.service-item {
    border-left: 4px solid var(--primary-color);
    padding-left: 2rem;
    position: relative;
}

.service-number {
    font-size: 2rem;
    font-weight: 800;
    color: rgba(0, 82, 204, 0.1);
    position: absolute;
    left: -2rem;
    top: 0;
}

.service-item h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-item p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

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

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

.features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* About Page */
.about-page {
    padding: 80px 20px;
}

.about-page h1 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 3rem;
}

.about-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.about-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Contact Page */
.contact-page {
    padding: 80px 20px;
}

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

.contact-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.contact-form {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 82, 204, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 82, 204, 0.4);
}

.form-message {
    margin-top: 1rem;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

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

.info-item {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.info-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.info-item p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.info-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-item a:hover {
    color: var(--primary-dark);
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 3rem 20px 1rem;
    margin-top: 4rem;
}

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

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

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

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

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
}

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

/* Shared section text */
.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    margin-top: -1.5rem;
}

.services-note {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 2rem;
    font-size: 0.95rem;
}

.services-note a {
    color: var(--primary-color);
    text-decoration: none;
}

.services-note a:hover {
    text-decoration: underline;
}

/* Services page — minor/de-emphasised item */
.service-item--minor {
    border-left-color: var(--border-color);
}

.service-item--minor h2 {
    font-size: 1.4rem;
    color: var(--text-secondary);
}

.service-item--minor .service-number {
    color: rgba(0, 0, 0, 0.06);
}

/* Portfolio Preview (homepage) */
.portfolio-preview {
    padding: 80px 20px;
    background: var(--background);
}

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

.view-all-wrap {
    text-align: center;
    margin-top: 3rem;
}

/* Portfolio Page */
.portfolio-page {
    padding: 80px 20px;
}

.portfolio-page h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.portfolio-filter {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 22px;
    border: 2px solid var(--border-color);
    background: var(--surface);
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    font-family: inherit;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

/* Portfolio Grid & Cards */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.portfolio-card {
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.portfolio-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 82, 204, 0.15);
    border-color: var(--primary-color);
}

.portfolio-visual {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pv-1 { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.pv-2 { background: linear-gradient(135deg, #ea580c, #dc2626); }
.pv-3 { background: linear-gradient(135deg, #059669, #0891b2); }
.pv-4 { background: linear-gradient(135deg, #1d4ed8, #4338ca); }
.pv-5 { background: linear-gradient(135deg, #0f766e, #0369a1); }
.pv-6 { background: linear-gradient(135deg, #0284c7, #7c3aed); }

.portfolio-card-body {
    padding: 1.5rem;
}

.portfolio-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.badge-app {
    background: rgba(0, 82, 204, 0.1);
    color: var(--primary-color);
}

.badge-site {
    background: rgba(0, 169, 204, 0.12);
    color: #006b80;
}

.portfolio-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
}

.portfolio-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.65;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tech-tag {
    font-size: 0.72rem;
    padding: 3px 8px;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

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

    .hamburger {
        display: flex;
    }

    .nav-wrapper {
        flex-wrap: wrap;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0;
        border-top: 1px solid var(--border-color);
        margin-top: 0.5rem;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-link {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-link::after {
        display: none;
    }

    .services-preview h2 {
        font-size: 1.8rem;
    }

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

    .cta-section h2 {
        font-size: 1.5rem;
    }

    .services-page h1,
    .about-page h1,
    .contact-page h1,
    .portfolio-page h1 {
        font-size: 1.8rem;
    }

    .portfolio-preview h2 {
        font-size: 1.8rem;
    }

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

    .service-item {
        padding-left: 1.5rem;
    }

    .service-number {
        left: -1.5rem;
    }
}

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

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

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

    .services-preview h2,
    .services-page h1,
    .about-page h1,
    .contact-page h1 {
        font-size: 1.5rem;
    }

    .error-code {
        font-size: 5rem;
    }

    .error-page h1 {
        font-size: 1.6rem;
    }
}

/* Error Pages */
.error-page {
    padding: 100px 20px;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.error-page .container {
    width: 100%;
}

.error-code {
    font-size: 8rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.error-page h1 {
    font-size: 2.2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.error-page > .container > p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.error-links p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.error-links ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0;
}

.error-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.error-links a:hover {
    text-decoration: underline;
}
