/* CSS Variables */
:root {
    --color-primary: #667eea;
    --color-primary-dark: #5a67d8;
    --color-secondary: #764ba2;
    --color-text: #333;
    --color-text-light: #666;
    --color-text-muted: #888;
    --color-bg: #fff;
    --color-bg-alt: #f8f9fa;
    --color-bg-dark: #1a1a2e;
    --color-border: #e1e1e1;
    --color-success: #28a745;
    --color-error: #dc3545;
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.2);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: 0.3s ease;
}

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

/* Base Styles */
html {
    scroll-behavior: smooth;
}

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

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

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

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

h1, h2, h3, h4 {
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* Navbar */
.navbar {
    background: var(--color-bg);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    color: var(--color-text);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
}

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

.btn-secondary {
    background: var(--color-bg);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
}

.btn-full {
    width: 100%;
}

/* Hero Section */
.hero {
    background: var(--gradient-primary);
    color: #fff;
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.hero-summary {
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero .btn-primary {
    background: #fff;
    color: var(--color-primary);
}

.hero .btn-secondary {
    border-color: #fff;
    color: #fff;
}

.hero .btn-secondary:hover {
    background: #fff;
    color: var(--color-primary);
}

/* Page Header */
.page-header {
    background: var(--gradient-primary);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}

.page-header p {
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Sections */
section {
    padding: 4rem 0;
}

section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.section-cta {
    text-align: center;
    margin-top: 2rem;
}

/* Certifications */
.certifications {
    background: var(--color-bg-alt);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.cert-group {
    background: var(--color-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.cert-group h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

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

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

.cert-list li:last-child {
    border-bottom: none;
}

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

.service-card {
    background: var(--color-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.service-card h3 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.link-arrow {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 600;
}

.link-arrow::after {
    content: ' \2192';
}

/* Services List */
.services-list {
    background: var(--color-bg-alt);
}

.service-detail {
    background: var(--color-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.service-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-border);
}

.service-header h2 {
    text-align: left;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.service-short {
    color: var(--color-text-light);
    font-size: 1.1rem;
}

.service-description {
    margin-bottom: 1.5rem;
    white-space: pre-line;
}

.service-meta {
    margin-top: 1rem;
}

.service-meta h4 {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

/* Tags */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
}

.tag {
    background: var(--color-bg-alt);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.tag-list-compact {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-list-compact li {
    background: var(--color-bg-alt);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

/* Timeline */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-primary);
    transform: translateX(-5px);
}

.timeline-content h3 {
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.timeline-content .company {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-content .period {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Experience Preview */
.experience-preview {
    background: var(--color-bg-alt);
}

/* Resume */
.resume-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
}

.resume-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.sidebar-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.sidebar-section h4 {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin: 1rem 0 0.5rem;
}

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

.contact-list li {
    margin-bottom: 0.75rem;
}

.contact-list strong {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.cert-list-compact {
    list-style: none;
    font-size: 0.9rem;
}

.cert-list-compact li {
    padding: 0.25rem 0;
}

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

.skills-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.skill-level {
    font-size: 0.8rem;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--color-bg-alt);
}

.skill-level.expert {
    background: var(--color-primary);
    color: #fff;
}

.skill-level.advanced {
    background: var(--color-secondary);
    color: #fff;
}

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

.resume-section h2 {
    text-align: left;
    color: var(--color-primary);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

.summary-text {
    font-size: 1.1rem;
    white-space: pre-line;
}

.job {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.job:last-child {
    border-bottom: none;
}

.job-header h3 {
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.job-header .company {
    font-weight: 600;
    color: var(--color-primary);
}

.job-header .period {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.job-highlights {
    padding-left: 1.25rem;
}

.job-highlights li {
    margin-bottom: 0.5rem;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h2 {
    text-align: left;
    margin-bottom: 1.5rem;
}

.contact-details {
    list-style: none;
}

.contact-details li {
    margin-bottom: 1.5rem;
}

.contact-details strong {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.response-time {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
}

.response-time h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.contact-form-wrapper {
    background: var(--color-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

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

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

.status-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    display: none;
}

.status-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* CTA Section */
.cta-section {
    background: var(--gradient-primary);
    color: #fff;
    text-align: center;
}

.cta-section h2 {
    color: #fff;
}

.cta-section p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.cta-section .btn-primary {
    background: #fff;
    color: var(--color-primary);
}

/* Footer */
.footer {
    background: var(--color-bg-dark);
    color: #fff;
    padding: 3rem 0 1rem;
}

.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(--color-primary);
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: rgba(255,255,255,0.8);
}

.footer-links a:hover {
    color: #fff;
}

.tech-stack {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

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

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

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

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

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

    .resume-sidebar {
        position: static;
        order: 2;
    }

    .resume-main {
        order: 1;
    }

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

    .contact-info {
        order: 2;
    }

    .contact-form-wrapper {
        order: 1;
    }
}

@media (max-width: 480px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }

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

    .btn {
        width: 100%;
    }
}

/* Architecture Page */
.architecture-overview {
    background: var(--color-bg-alt);
}

.architecture-diagram {
    background: var(--color-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.diagram {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.75rem;
    line-height: 1.4;
    white-space: pre;
    color: var(--color-text);
    margin: 0;
}

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

.component-card {
    background: var(--color-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.component-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.component-card h3 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.component-stack {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    font-family: 'Courier New', Consolas, monospace;
}

.component-features {
    padding-left: 1.25rem;
    font-size: 0.95rem;
}

.component-features li {
    margin-bottom: 0.5rem;
}

.architecture-components {
    background: var(--color-bg-alt);
}

.security-controls {
    background: var(--color-bg);
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2rem;
    color: var(--color-text-light);
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.control-card {
    background: var(--color-bg-alt);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-primary);
}

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

.control-card ul {
    list-style: none;
    padding: 0;
}

.control-card li {
    padding: 0.4rem 0;
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.control-card li::before {
    content: '\2713';
    color: var(--color-success);
    margin-right: 0.5rem;
    font-weight: bold;
}

.deployment-workflow {
    background: var(--color-bg-alt);
}

.workflow-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.workflow-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--color-bg);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    min-width: 160px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.step-content p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0;
}

.workflow-arrow {
    font-size: 1.5rem;
    color: var(--color-primary);
    font-weight: bold;
}

.source-code {
    background: var(--gradient-primary);
    color: #fff;
    text-align: center;
}

.source-code h2 {
    color: #fff;
}

.source-code p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.source-code .btn-primary {
    background: #fff;
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .diagram {
        font-size: 0.6rem;
    }

    .workflow-steps {
        flex-direction: column;
    }

    .workflow-arrow {
        transform: rotate(90deg);
    }

    .workflow-step {
        width: 100%;
        max-width: 300px;
    }
}
