/* ============================================
   Personal Blog Website - Custom Styles
   Matching Portfolio Design Theme
   ============================================ */

/* CSS Variables - Matching Portfolio Theme */
:root {
    --darkest-gray: rgb(5, 5, 5);
    --very-dark-gray: rgb(10, 10, 11);
    --dark-gray-1: rgb(15, 15, 16);
    --dark-gray-2: rgb(15, 15, 16);
    --almost-black: rgb(18, 18, 18);
    --dark-gray-3: rgb(20, 20, 21);
    --dark-gray-4: rgb(25, 25, 26);
    --border-color: rgb(32, 32, 33);
    --dark-gray-6: rgb(40, 40, 42);
    --dark-gray-7: rgb(45, 45, 47);
    --medium-gray: rgb(102, 102, 102);
    --light-gray-1: rgb(117, 117, 117);
    --light-gray-2: rgb(153, 153, 153);
    --light-gray-3: rgb(204, 204, 204);
    --very-light-gray: rgb(230, 230, 230);
    --near-white: rgb(242, 242, 242);
    --white: rgb(255, 255, 255);
    
    --font-space-grotesk: 'Space Grotesk', sans-serif;
    
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-space-grotesk);
    background-color: var(--darkest-gray);
    color: var(--very-light-gray);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    background-color: var(--almost-black);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.navbar-brand .brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--very-light-gray);
    text-decoration: none;
    transition: var(--transition);
}

.navbar-brand:hover .brand-text {
    color: var(--white);
}

.nav-link {
    color: var(--light-gray-2) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--white) !important;
    background-color: var(--dark-gray-4);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--very-light-gray);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 80%;
}

/* Hero Section */
.hero-section {
    padding-top: 80px;
    background: linear-gradient(135deg, var(--darkest-gray) 0%, var(--very-dark-gray) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(230, 230, 230, 0.05) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--light-gray-2);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-image {
    position: relative;
    height: 400px;
    animation: fadeInRight 0.8s ease-out 0.4s both;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-img {
    width: 100%;
    max-width: 500px;
    height: 400px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    animation: float 6s ease-in-out infinite;
}

.hero-img:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 14px 28px;
    background-color: var(--almost-black);
    color: var(--very-light-gray);
    border: 1px solid var(--dark-gray-4);
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.btn-primary:hover {
    background-color: var(--dark-gray-4);
    border-color: var(--border-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Section Styles */
section {
    padding: 80px 0;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--light-gray-2);
}

/* About Section */
.about-section {
    background-color: var(--very-dark-gray);
}

.about-card {
    background-color: var(--dark-gray-2);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2.5rem;
    height: 100%;
    transition: var(--transition);
    text-align: center;
}

.about-card:hover {
    transform: translateY(-10px);
    border-color: var(--dark-gray-6);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    background-color: var(--dark-gray-3);
}

.about-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.about-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1rem;
}

.about-card p {
    color: var(--light-gray-2);
    line-height: 1.8;
}

/* Blog Section */
.blog-section {
    background-color: var(--darkest-gray);
}

.blog-card {
    background-color: var(--dark-gray-2);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-10px);
    border-color: var(--dark-gray-6);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.blog-image {
    height: 200px;
    background: linear-gradient(135deg, var(--dark-gray-4) 0%, var(--border-color) 100%);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

.blog-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: var(--transition);
}

.blog-card:hover .blog-image::before {
    left: 100%;
    transition: 0.6s;
}

.blog-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--almost-black);
    color: var(--very-light-gray);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.blog-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-date {
    color: var(--light-gray-1);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.blog-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-excerpt {
    color: var(--light-gray-2);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    flex-grow: 1;
}

.blog-link {
    color: var(--very-light-gray);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    cursor: pointer;
}

.blog-link:hover {
    color: var(--white);
    transform: translateX(5px);
}

.blog-card {
    cursor: pointer;
}

/* Contact Section */
.contact-section {
    background-color: var(--very-dark-gray);
}

.contact-form {
    background-color: var(--dark-gray-2);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2.5rem;
}

.form-control {
    background-color: var(--dark-gray-3);
    border: 2px solid var(--border-color);
    color: var(--very-light-gray);
    padding: 1rem;
    border-radius: 10px;
    transition: var(--transition);
    font-family: var(--font-space-grotesk);
}

.form-control:focus {
    background-color: var(--dark-gray-4);
    border-color: var(--dark-gray-6);
    color: var(--white);
    outline: none;
    box-shadow: 0 0 0 3px rgba(230, 230, 230, 0.1);
}

.form-control::placeholder {
    color: var(--light-gray-1);
}

/* Footer */
.footer {
    background-color: var(--almost-black);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    color: var(--light-gray-2);
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-link {
    color: var(--light-gray-2);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.social-link:hover {
    color: var(--white);
    background-color: var(--dark-gray-4);
    transform: translateY(-2px);
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-image {
        height: 300px;
        margin-top: 2rem;
    }
    
    .hero-img {
        height: 300px;
        max-width: 100%;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .about-card,
    .blog-card {
        margin-bottom: 2rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .contact-form {
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-image {
        height: 250px;
    }
    
    .hero-img {
        height: 250px;
    }
    
    .btn-primary {
        padding: 12px 24px;
        font-size: 0.85rem;
    }
    
    .blog-content {
        padding: 1.5rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background-color: var(--darkest-gray);
}

::-webkit-scrollbar-thumb {
    background-color: var(--dark-gray-6);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--dark-gray-7);
}

/* Blog Modal Styles */
.blog-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease-out;
}

.blog-modal.show {
    display: flex;
}

.blog-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.blog-modal-content {
    position: relative;
    background-color: var(--dark-gray-2);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease-out;
    z-index: 10001;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.blog-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--dark-gray-4);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--very-light-gray);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10002;
    line-height: 1;
    padding: 0;
}

.blog-modal-close:hover {
    background-color: var(--dark-gray-6);
    color: var(--white);
    transform: rotate(90deg);
}

.blog-modal-header {
    position: relative;
    margin-bottom: 2rem;
}

.blog-modal-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
    display: block;
}

.blog-modal-meta {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.blog-modal-category {
    background-color: var(--almost-black);
    color: var(--very-light-gray);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.blog-modal-date {
    color: var(--light-gray-3);
    font-size: 0.9rem;
    background-color: rgba(18, 18, 18, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.blog-modal-body {
    padding: 2.5rem;
}

.blog-modal-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.blog-modal-text {
    color: var(--light-gray-2);
    font-size: 1.1rem;
    line-height: 1.9;
}

.blog-modal-text p {
    margin-bottom: 1.5rem;
}

.blog-modal-text h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--white);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-modal-text h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--very-light-gray);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.blog-modal-text ul,
.blog-modal-text ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.blog-modal-text li {
    margin-bottom: 0.5rem;
}

.blog-modal-text code {
    background-color: var(--dark-gray-3);
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--very-light-gray);
}

.blog-modal-text pre {
    background-color: var(--dark-gray-3);
    padding: 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.blog-modal-text pre code {
    background: none;
    padding: 0;
}

.blog-modal-text blockquote {
    border-left: 4px solid var(--dark-gray-6);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--light-gray-3);
    font-style: italic;
}

.blog-modal-footer {
    padding: 1.5rem 2.5rem 2.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .blog-modal {
        padding: 1rem;
    }
    
    .blog-modal-content {
        max-height: 95vh;
    }
    
    .blog-modal-image {
        height: 250px;
    }
    
    .blog-modal-body {
        padding: 1.5rem;
    }
    
    .blog-modal-title {
        font-size: 1.75rem;
    }
    
    .blog-modal-text {
        font-size: 1rem;
    }
    
    .blog-modal-close {
        top: 1rem;
        right: 1rem;
        width: 35px;
        height: 35px;
        font-size: 1.25rem;
    }
}

