/*
Theme Name: Himas Rafeek Portfolio
Theme URI: https://himasrafeek.com
Author: Himas Rafeek
Author URI: https://himasrafeek.com
Description: A modern, minimal portfolio theme for developers and creators
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: portfolio
Tags: portfolio, blog, modern, minimal, responsive
*/

/* ==========================================================================
   CSS Variables - Updated for Flat Cool Colors
   ========================================================================== */
:root {
    --primary-color: #14b8a6;
    --secondary-color: #0d9488;
    --accent-color: #5eead4;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-light: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    padding: 0.2em 0.4em;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

pre {
    background-color: var(--bg-dark);
    color: #e5e7eb;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

.section-lg {
    padding: 6rem 0;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.site-logo:hover {
    color: var(--primary-color);
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-navigation a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.main-navigation a:hover {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    padding: 6rem 0 8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,50 Q300,0 600,50 T1200,50 L1200,120 L0,120 Z" fill="rgba(255,255,255,0.1)"/></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: white;
}

.hero-section .lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 700px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: transparent;
    color: white;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Grid Layouts
   ========================================================================== */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.project-card {
    position: relative;
    overflow: hidden;
}

.project-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

/* ==========================================================================
   Blog Section
   ========================================================================== */
.blog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.blog-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.blog-excerpt {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:hover {
    gap: 0.75rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: var(--bg-dark);
    color: #9ca3af;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #9ca3af;
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Table Styles
   ========================================================================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--bg-secondary);
    font-weight: 600;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
    }
    
    .main-navigation.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        border-top: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
    }
    
    .main-navigation.active ul {
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }
    
    .main-navigation.active ul li {
        width: 100%;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-lg {
        padding: 4rem 0;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.hidden { display: none; }

/* ==========================================================================
   Content Styling (WordPress Editor Content)
   ========================================================================== */
.post-content,
.prose {
    color: #475569;
    line-height: 1.75;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    color: #0f172a;
    font-weight: 700;
    line-height: 1.25;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content h2 {
    font-size: 1.875rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.post-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content h4 {
    font-size: 1.25rem;
}

.post-content p {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    color: #475569;
}

.post-content a {
    color: #14b8a6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.post-content a:hover {
    color: #0d9488;
    text-decoration: underline;
}

.post-content strong,
.post-content b {
    color: #0f172a;
    font-weight: 600;
}

.post-content em,
.post-content i {
    font-style: italic;
}

.post-content ul,
.post-content ol {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    padding-left: 1.75rem;
}

.post-content ul {
    list-style-type: disc;
}

.post-content ol {
    list-style-type: decimal;
}

.post-content li {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    color: #475569;
    line-height: 1.75;
}

.post-content li p {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.post-content ul ul,
.post-content ol ul {
    list-style-type: circle;
    margin-top: 0.5rem;
}

.post-content ol ol,
.post-content ul ol {
    list-style-type: lower-alpha;
    margin-top: 0.5rem;
}

.post-content blockquote {
    border-left: 4px solid #14b8a6;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #64748b;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.post-content blockquote p {
    margin: 0;
}

.post-content code {
    color: #14b8a6;
    background-color: #f1f5f9;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-weight: 500;
    font-family: var(--font-mono);
}

.post-content pre {
    background-color: #0f172a;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 2rem 0;
    line-height: 1.7;
}

.post-content pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    font-size: 0.875rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 2rem 0;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.post-content figure {
    margin: 2rem 0;
}

.post-content figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.75rem;
    font-style: italic;
}

.post-content hr {
    border: 0;
    border-top: 2px solid #e2e8f0;
    margin: 3rem 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.875rem;
}

.post-content table th {
    background-color: #f1f5f9;
    color: #0f172a;
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
}

.post-content table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.post-content table tr:hover {
    background-color: #f8fafc;
}

/* WordPress Blocks */
.post-content .wp-block-image img {
    border-radius: 0.75rem;
}

.post-content .wp-block-quote {
    border-left: 4px solid #14b8a6;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
}

.post-content .wp-block-code {
    background-color: #0f172a;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
}

.post-content .wp-block-pullquote {
    border-top: 4px solid #14b8a6;
    border-bottom: 4px solid #14b8a6;
    padding: 2rem 0;
    margin: 3rem 0;
    text-align: center;
}

.post-content .wp-block-separator {
    border: 0;
    border-top: 2px solid #e2e8f0;
    margin: 3rem 0;
}

.post-content .alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.post-content .alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.post-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Video embeds */
.post-content iframe,
.post-content video {
    max-width: 100%;
    border-radius: 0.75rem;
    margin: 2rem 0;
}

/* Responsive typography */
@media (max-width: 768px) {
    .post-content h2 {
        font-size: 1.5rem;
    }
    
    .post-content h3 {
        font-size: 1.25rem;
    }
    
    .post-content pre {
        padding: 1rem;
        font-size: 0.8125rem;
    }
}
