/* ===================================
   CSS Reset & Base Styles
   =================================== */

:root {
    /* Dark Mode Palette (Slate/Sky theme) */
    --bg-color: #0f172a;       /* Slate 900 */
    --bg-light: #1e293b;       /* Slate 800 */
    --bg-lighter: #334155;     /* Slate 700 */
    
    --text-color: #f1f5f9;     /* Slate 100 */
    --text-light: #94a3b8;     /* Slate 400 */
    --text-muted: #64748b;     /* Slate 500 */

    --primary-color: #38bdf8;  /* Sky 400 */
    --primary-hover: #0ea5e9;  /* Sky 500 */
    --accent-color: #f472b6;   /* Pink 400 - for subtle accents */

    --border-color: #334155;   /* Slate 700 */
    
    --card-bg: #1e293b;
    --nav-bg: rgba(15, 23, 42, 0.9); /* Semi-transparent slate 900 */

    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    
    --transition: all 0.3s ease;
    --radius: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
}

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

/* ===================================
   Typography
   =================================== */

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.02em;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

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

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

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

.navbar {
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-brand h1 {
    font-size: 1.25rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.01em;
}

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

.nav-menu a {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
}

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

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

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

.hero {
    padding: 9rem 0 7rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top center, var(--bg-light) 0%, var(--bg-color) 70%);
}

/* Floating gradient orbs for atmosphere */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

.hero::before {
    width: 420px;
    height: 420px;
    background: var(--primary-color);
    top: -120px;
    left: -80px;
    animation: drift 18s ease-in-out infinite;
}

.hero::after {
    width: 360px;
    height: 360px;
    background: var(--accent-color);
    bottom: -140px;
    right: -60px;
    opacity: 0.35;
    animation: drift 22s ease-in-out infinite reverse;
}

.hero-content {
    max-width: 820px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(120deg, #ffffff 0%, #bae6fd 55%, #7dd3fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content .lead {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

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

.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
    text-align: center;
    font-size: 1rem;
}

.btn-primary {
    background-image: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--bg-color);
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(56, 189, 248, 0.45);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--text-color);
    background-color: var(--bg-light);
}

/* ===================================
   Sections
   =================================== */

section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

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

.section-title p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

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

/* ===================================
   Cards & Services
   =================================== */

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

.card {
    background-image: linear-gradient(160deg, var(--bg-lighter) 0%, var(--card-bg) 45%);
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* Gradient accent line that grows across the top on hover */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-image: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 2.25rem;
    line-height: 1;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background-image: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(244, 114, 182, 0.18));
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

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

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

.expertise-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    list-style: none;
    margin-top: 2rem;
}

.expertise-list li {
    background-color: var(--bg-light);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-color);
    font-weight: 500;
}

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

.portfolio-grid {
    display: grid;
    gap: 2rem;
}

.portfolio-item {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: grid;
    grid-template-columns: 250px 1fr;
    transition: var(--transition);
}

.portfolio-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.portfolio-image {
    background-image:
        radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.25), transparent 60%),
        radial-gradient(circle at 75% 80%, rgba(244, 114, 182, 0.22), transparent 55%),
        linear-gradient(160deg, var(--bg-lighter), var(--bg-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    overflow: hidden;
}

.portfolio-image .placeholder-image {
    transition: transform 0.4s ease;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}

.portfolio-item:hover .portfolio-image .placeholder-image {
    transform: scale(1.12) rotate(-3deg);
}

.portfolio-details {
    padding: 2.5rem;
}

.portfolio-category {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.portfolio-tags {
    margin-top: 1.5rem;
}

/* ===================================
   Blog
   =================================== */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.blog-post {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 2rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.blog-post:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.blog-date {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    display: block;
}

.blog-post-header h3 a {
    color: var(--text-color);
    transition: var(--transition);
}

.blog-post-header h3 a:hover {
    color: var(--primary-color);
}

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

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

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-item h4 {
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.contact-form-container {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-color);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

/* ===================================
   Tags & Utilities
   =================================== */

.tag {
    display: inline-block;
    padding: 0.35rem 1rem;
    background-color: var(--bg-lighter);
    color: var(--text-light);
    border-radius: 20px;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
}

.page-header {
    background-color: var(--bg-light);
    padding: 6rem 0 4rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

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

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

.footer {
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0;
    margin-top: 4rem;
}

.footer p {
    color: var(--text-muted);
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.social-links a:hover {
    color: var(--primary-color);
}

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

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 73px;
        flex-direction: column;
        background-color: var(--bg-light);
        width: 100%;
        padding: 2rem;
        border-bottom: 1px solid var(--border-color);
        transition: var(--transition);
    }

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

    .nav-toggle {
        display: flex;
    }

    .hero-content h2 {
        font-size: 2.5rem;
    }

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

    .portfolio-image {
        min-height: 200px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem 1rem;
    }

    .hero-content h2 { font-size: 2.5rem; }
}

/* ===================================
   Enhancements: atmosphere, badge,
   eyebrow, stats, motion
   =================================== */

/* Site-wide background texture: faint grid + soft color wash, fixed behind everything */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 15% 0%, rgba(56, 189, 248, 0.08), transparent 40%),
        radial-gradient(circle at 85% 100%, rgba(244, 114, 182, 0.07), transparent 45%),
        linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 44px 44px, 44px 44px;
}

/* Availability badge (hero eyebrow pill) */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    margin-bottom: 1.75rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background-color: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(6px);
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
}

.badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #4ade80;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
    animation: pulse 2.2s ease-in-out infinite;
}

/* Small uppercase label above section headings */
.eyebrow {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background-image: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Stats / credibility band */
.stats {
    padding: 3.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(30, 41, 59, 0.4);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    background-image: linear-gradient(135deg, #ffffff, #7dd3fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Tag hover polish */
.tag {
    transition: var(--transition);
}

.portfolio-tags .tag:hover,
.skill-tag:hover {
    border-color: var(--primary-color);
    color: var(--text-color);
}

/* Custom selection + scrollbar */
::selection {
    background-color: rgba(56, 189, 248, 0.3);
    color: #fff;
}

::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb {
    background: var(--bg-lighter);
    border-radius: 999px;
    border: 3px solid var(--bg-color);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Visible focus for keyboard users */
a:focus-visible,
.btn:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40px, 30px); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
    70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .hero::before,
    .hero::after,
    .badge .dot {
        animation: none;
    }
    html { scroll-behavior: auto; }
}
