/* ===== CSS Variables & Color Palette ===== */
:root {
    --primary: #1B2A4A;
    --primary-light: #2C3E6B;
    --accent: #2E86DE;
    --accent-light: #54A0FF;
    --accent-dark: #1B5FAA;
    --navy: #1B2A4A;
    --navy-dark: #0F1B33;
    --blue: #2E86DE;
    --blue-light: #54A0FF;
    --dark: #FFFFFF;
    --dark-card: #F8FAFC;
    --dark-surface: #F1F5F9;
    --text: #1B2A4A;
    --text-muted: #64748B;
    --text-dark: #1B2A4A;
    --white: #FFFFFF;
    --bg-light: #F8FAFC;
    --border: rgba(27, 42, 74, 0.1);
    --shadow: 0 4px 6px -1px rgba(27, 42, 74, 0.08), 0 2px 4px -1px rgba(27, 42, 74, 0.04);
    --shadow-lg: 0 20px 60px -15px rgba(27, 42, 74, 0.15);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--white);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

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

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

img {
    max-width: 100%;
    height: auto;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.7);
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.navbar .nav-toggle span {
    background: var(--white);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.navbar.scrolled .nav-link {
    color: var(--text-muted);
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
    color: var(--blue);
    background: rgba(46, 134, 222, 0.08);
}

.navbar.scrolled .nav-toggle span {
    background: var(--navy);
}

.navbar.scrolled .logo-img {
    /* keep original colors when scrolled */
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 64px;
    width: auto;
    object-fit: contain;
}

.logo-img-light {
    filter: brightness(0) invert(1);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--navy), var(--blue));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    color: var(--white);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--blue);
    background: rgba(46, 134, 222, 0.08);
}

.nav-cta {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--blue), var(--accent-dark));
    color: var(--white);
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 134, 222, 0.3);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--primary-light) 100%);
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: var(--blue);
    top: -200px;
    right: -200px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--blue-light);
    bottom: -100px;
    left: -100px;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-light);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: var(--blue-light);
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #4ADE80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--white);
}

.gradient-text {
    background: linear-gradient(135deg, var(--blue-light), #93C5FD);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--accent-dark));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(46, 134, 222, 0.35);
}

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

.btn-outline:hover {
    border-color: var(--blue-light);
    color: var(--blue-light);
    background: rgba(255, 255, 255, 0.05);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
}

.stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

/* Code Window */
.code-window {
    background: var(--navy-dark);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #FF5F57; }
.dot.yellow { background: #FFBD2E; }
.dot.green { background: #28CA41; }

.code-title {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'JetBrains Mono', monospace;
}

.code-body {
    padding: 24px;
}

.code-body pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    line-height: 1.8;
    color: #E2E8F0;
}

.code-keyword { color: #C678DD; }
.code-var { color: #E06C75; }
.code-prop { color: #E5C07B; }
.code-string { color: #54A0FF; }

/* ===== Sections ===== */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(46, 134, 222, 0.08);
    border: 1px solid rgba(46, 134, 222, 0.2);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 12px;
}

.section-desc {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* ===== About Section ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-text strong {
    color: var(--navy);
}

.about-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--navy);
    box-shadow: var(--shadow);
}

.highlight-item i {
    color: var(--blue);
    font-size: 16px;
}

.motto-card {
    background: linear-gradient(135deg, var(--navy), var(--primary-light));
    border: none;
    border-radius: var(--radius-lg);
    padding: 40px;
    position: relative;
}

.motto-card i {
    font-size: 32px;
    color: var(--blue-light);
    opacity: 0.5;
    margin-bottom: 16px;
}

.motto-card p {
    font-size: 18px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin-bottom: 16px;
}

.motto-card cite {
    font-size: 14px;
    color: var(--blue-light);
    font-style: normal;
    font-weight: 600;
}

/* ===== Services Section ===== */
.services {
    background: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--blue-light));
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--blue);
    box-shadow: 0 20px 40px rgba(46, 134, 222, 0.12);
}

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

.service-card.featured {
    border-color: var(--blue);
    background: linear-gradient(135deg, rgba(46, 134, 222, 0.03), var(--white));
}

.service-card.featured::before {
    opacity: 1;
}

.service-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 12px;
    background: var(--blue);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
}

.service-icon {
    width: 56px;
    height: 56px;
    background: rgba(46, 134, 222, 0.08);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.service-icon i {
    font-size: 24px;
    color: var(--blue);
}

.service-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 12px;
}

.service-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}

.service-tags li {
    padding: 4px 12px;
    background: rgba(46, 134, 222, 0.06);
    border: 1px solid rgba(46, 134, 222, 0.15);
    border-radius: 6px;
    font-size: 12px;
    color: var(--blue);
    font-weight: 500;
}

/* ===== Projects Section ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--blue);
    box-shadow: 0 20px 40px rgba(46, 134, 222, 0.12);
}

.project-card.large {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.project-image {
    position: relative;
    overflow: hidden;
}

.project-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--navy), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-card.large .project-placeholder {
    height: 100%;
    min-height: 280px;
}

.project-placeholder i {
    font-size: 48px;
    color: var(--blue-light);
    opacity: 0.6;
}

.project-info {
    padding: 24px;
}

.project-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.project-tags span {
    padding: 3px 10px;
    background: rgba(46, 134, 222, 0.08);
    border-radius: 4px;
    font-size: 11px;
    color: var(--blue);
    font-weight: 600;
}

.project-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
}

.project-info p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--blue);
}

.project-link:hover {
    color: var(--accent-dark);
}

.projects-cta {
    text-align: center;
    margin-top: 48px;
}

.projects-cta .btn-outline {
    border-color: var(--blue);
    color: var(--blue);
}

.projects-cta .btn-outline:hover {
    background: var(--blue);
    color: var(--white);
}

/* ===== Tech Stack Section ===== */
.tech {
    background: var(--bg-light);
}

.tech-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.tech-category {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
}

.tech-category h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tech-category h3 i {
    color: var(--blue);
}

.tech-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tech-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.tech-item:hover {
    border-color: rgba(46, 134, 222, 0.2);
    background: rgba(46, 134, 222, 0.03);
}

.tech-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--navy);
}

.tech-level {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tech-level.expert {
    background: rgba(46, 134, 222, 0.1);
    color: var(--blue);
}

.tech-level.advanced {
    background: rgba(27, 42, 74, 0.08);
    color: var(--navy);
}

.tech-level.intermediate {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
}

/* ===== Contact Section ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.contact-card:hover {
    border-color: var(--blue);
    transform: translateX(5px);
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: rgba(46, 134, 222, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 20px;
    color: var(--blue);
}

.contact-detail h4 {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 2px;
}

.contact-detail a {
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
}

.contact-detail a:hover {
    color: var(--blue);
}

.contact-form-wrapper {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 14px 18px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--navy);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(46, 134, 222, 0.1);
}

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

.form-group select {
    appearance: none;
    cursor: pointer;
}

/* ===== Footer ===== */
.footer {
    background: var(--navy);
    border-top: none;
    padding: 60px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}

.footer .nav-logo .logo-text {
    color: var(--white);
}

.footer .logo-accent {
    color: var(--blue-light);
}

.footer .logo-icon {
    background: linear-gradient(135deg, var(--blue), var(--blue-light));
}

.footer-brand p {
    margin-top: 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    max-width: 300px;
}

.footer-links h4,
.footer-social h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-links a:hover {
    color: var(--blue-light);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue);
}

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

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-visual {
        display: none;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-card.large {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 80px 32px 32px;
        transition: var(--transition);
        border-left: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

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

    .hero-stats {
        gap: 24px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-highlights {
        grid-template-columns: 1fr;
    }

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

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

    .project-card.large {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

    .tech-categories {
        grid-template-columns: 1fr;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.animate-in:nth-child(1) { animation-delay: 0.1s; }
.animate-in:nth-child(2) { animation-delay: 0.2s; }
.animate-in:nth-child(3) { animation-delay: 0.3s; }
.animate-in:nth-child(4) { animation-delay: 0.4s; }
.animate-in:nth-child(5) { animation-delay: 0.5s; }
.animate-in:nth-child(6) { animation-delay: 0.6s; }
