/*
Theme Name: Kartik Jain Portfolio
Theme URI: https://www.karttikjain.in/
Author: Kartik Jain
Author URI: https://www.karttikjain.in/
Description: Premium Custom Portfolio Theme with dynamic Resume and Blog integration.
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: kartik-portfolio
*/

/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    /* Font Config - Using Geist font */
    --font-primary: 'Geist', system-ui, -apple-system, sans-serif;

    /* Common Dimensions */
    --max-width: 800px;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Light Mode Palette (Default) */
    --bg-color: #ffffff;
    --bg-navbar: rgba(255, 255, 255, 0.8);
    --text-color: #0f172a;
    /* slate-900 */
    --text-muted: #475569;
    /* slate-600 */
    --text-very-muted: #94a3b8;
    /* slate-400 */
    --border-color: #e2e8f0;
    /* slate-200 */
    --border-hover: #cbd5e1;
    /* slate-300 */
    --card-bg: #f8fafc;
    /* slate-50 */
    --card-hover-bg: #f1f5f9;
    /* slate-100 */
    --accent-color: #4f46e5;
    /* indigo-600 */
    --accent-glow: rgba(79, 70, 229, 0.15);
    --accent-gradient: linear-gradient(135deg, #4f46e5, #7c3aed);
    --badge-bg: #f1f5f9;
    /* slate-100 */
    --badge-text: #334155;
    /* slate-700 */
    --badge-hover-bg: #e2e8f0;
    --timeline-dot: #cbd5e1;
    --timeline-line: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.03), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
}



/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

body.loading * {
    transition: none !important;
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.content-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 80px 24px 60px;
    /* offset for nav */
}

section {
    padding: 40px 0;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.25;
}

h1 {
    font-size: 2.5rem;
}

h2.section-title {
    font-size: 1.5rem;
    margin-bottom: 24px;
    position: relative;
    display: inline-block;
}

h2.section-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 32px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: var(--border-radius-full);
}

.section-description {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: -12px;
    margin-bottom: 30px;
}

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

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

/* ==========================================================================
   STICKY NAVBAR
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--bg-navbar);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.05em;
}

.nav-menu {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-color);
}



/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    gap: 8px;
}

.btn-icon {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff !important;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-secondary {
    background-color: var(--badge-bg);
    color: var(--text-color) !important;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--badge-hover-bg);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    padding-top: 20px;
    padding-bottom: 0px;
}

.hero-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.hero-text-block {
    flex: 1;
}

.hero-title {
    font-size: 2.75rem;
    margin-bottom: 8px;
    background: linear-gradient(to right, var(--text-color) 60%, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 12px;
}

.hero-highlights {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.highlight-separator {
    color: var(--text-very-muted);
    font-weight: 400;
}

.hero-location {
    font-size: 0.875rem;
    color: var(--text-very-muted);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.inline-icon {
    width: 14px;
    height: 14px;
}

.hero-social-links {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.social-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-fast);
}

.social-icon-btn:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background-color: var(--card-bg);
    transform: translateY(-2px);
}

.social-icon-btn svg {
    width: 18px;
    height: 18px;
}

.hero-actions {
    display: flex;
    gap: 12px;
}

.hero-avatar-block {
    flex-shrink: 0;
}

.avatar-wrapper {
    position: relative;
    width: 128px;
    height: 128px;
    border-radius: var(--border-radius-full);
    overflow: hidden;
    border: 3px solid var(--border-color);
    transition: border-color var(--transition-normal);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-normal);
}

.avatar-wrapper:hover .avatar-img {
    transform: scale(1.1);
}

.avatar-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
    letter-spacing: -0.05em;
    user-select: none;
    z-index: 1;
}

/* ==========================================================================
   CARDS & COMMON SECTION WORK
   ========================================================================== */
.section-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-normal), background-color var(--transition-normal);
}

.about-text {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Achievements List */
.achievements-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.achievement-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    transition: var(--transition-normal);
}

.achievement-item:hover {
    border-color: var(--border-hover);
    background-color: var(--card-hover-bg);
}

.achievement-icon {
    width: 18px;
    height: 18px;
    color: var(--accent-color);
    flex-shrink: 0;
    margin-top: 3px;
}

.achievement-text {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.achievement-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.achievement-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}

.achievement-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.achievement-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.achievement-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
}

.achievement-badge.skill {
    background-color: var(--accent-glow);
    color: var(--accent-color);
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.achievement-badge.client {
    background-color: var(--badge-bg);
    color: var(--badge-text);
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   TIMELINE (EXPERIENCE & EDUCATION)
   ========================================================================== */
.timeline {
    position: relative;
    margin-left: 16px;
}

.timeline-item {
    position: relative;
    margin-bottom: 16px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-favicon-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-full);
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    z-index: 2;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-normal), transform var(--transition-normal), background-color var(--transition-normal);
    flex-shrink: 0;
}

.timeline-header-row:hover .timeline-favicon-wrapper {
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.timeline-favicon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 5px;
}

.timeline-favicon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--accent-gradient);
    color: #ffffff;
}

.timeline-favicon-placeholder svg {
    width: 18px;
    height: 18px;
    color: #ffffff;
}

.timeline-header-row {
    display: flex;
    align-items: center;
    gap: 24px;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    padding: 6px 12px;
    margin-left: -12px;
    transition: background-color var(--transition-fast);
}

.timeline-header-row:hover {
    background-color: var(--card-bg);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
}

.timeline-title-block {
    display: flex;
    flex-direction: column;
}

.timeline-title {
    font-size: 1.125rem;
    font-weight: 700;
    transition: color var(--transition-fast);
}

.timeline-header-row:hover .timeline-title {
    color: var(--accent-color);
}

.timeline-toggle-icon {
    width: 16px;
    height: 16px;
    color: var(--text-very-muted);
    transition: transform var(--transition-normal), color var(--transition-fast);
}

.timeline-header-row:hover .timeline-toggle-icon {
    color: var(--accent-color);
}

.timeline-item.active .timeline-toggle-icon {
    transform: rotate(180deg);
}

.timeline-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
    line-height: 1.5;
    display: block;
}

.timeline-subtitle a {
    color: var(--text-muted);
    text-decoration: underline;
}

.timeline-subtitle a:hover {
    color: var(--accent-color);
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--text-very-muted);
    font-weight: 600;
    white-space: nowrap;
    text-align: right;
}

.timeline-body {
    font-size: 0.925rem;
    color: var(--text-muted);
    padding-left: 72px;
    /* icon 48px + gap 24px = 72px */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease-out;
}

.timeline-item.active .timeline-body {
    max-height: 500px;
    opacity: 1;
}

.timeline-bullets {
    padding-left: 18px;
    margin-top: 8px;
}

.timeline-bullets li {
    margin-bottom: 6px;
    line-height: 1.6;
}

.timeline-bullets li::marker {
    color: var(--accent-color);
}

/* ==========================================================================
   SKILLS SECTION
   ========================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.skills-category-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px;
    transition: var(--transition-normal);
}

.skills-category-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.skills-category-title {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 14px;
    color: var(--accent-color);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 12px;
    background-color: var(--badge-bg);
    color: var(--badge-text);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-full);
    transition: var(--transition-fast);
}

.skill-badge:hover {
    background-color: var(--badge-hover-bg);
    border-color: var(--border-hover);
    color: var(--text-color);
    transform: translateY(-1px);
}

/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */
/* ==========================================================================
   PROJECTS SECTION (TIMELINE LAYOUT)
   ========================================================================== */
.section-header {
    text-align: center;
    margin-bottom: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.section-badge-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.section-badge-wrapper::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background-color: var(--border-color);
    z-index: 1;
}

.section-badge {
    position: relative;
    display: inline-block;
    background-color: var(--text-color);
    color: var(--bg-color);
    padding: 6px 16px;
    border-radius: var(--border-radius-full);
    font-size: 0.725rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
    box-shadow: 0 0 0 8px var(--bg-color);
}

.section-title-large {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-color);
    margin-bottom: 8px;
}

.section-description-large {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.projects-timeline {
    position: relative;
    margin-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.projects-timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    /* Center of the 48px favicon wrapper: 48px / 2 = 24px */
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--timeline-line);
    z-index: 1;
}

.project-timeline-item {
    position: relative;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

/* Handled by base class styles */

.project-timeline-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-timeline-date {
    font-size: 0.8rem;
    color: var(--text-very-muted);
    font-weight: 500;
}

.project-timeline-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 2px 0;
    transition: var(--transition-fast);
}

.project-timeline-item:hover .project-timeline-title {
    color: var(--accent-color);
}

.project-timeline-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.project-timeline-desc {
    font-size: 0.925rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.project-timeline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Link pill buttons (like Github/Website) */
.project-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--text-color);
    color: var(--bg-color) !important;
    padding: 6px 12px;
    border-radius: var(--border-radius-full);
    font-size: 0.725rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.project-pill-btn:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.project-pill-btn svg {
    color: var(--bg-color);
}

/* Pill badge for private */
.project-pill-badge.private {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--badge-bg);
    color: var(--badge-text);
    padding: 6px 12px;
    border-radius: var(--border-radius-full);
    font-size: 0.725rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

/* Technology badges */
.project-tech-badge {
    display: inline-flex;
    align-items: center;
    background-color: var(--badge-bg);
    color: var(--badge-text);
    padding: 4px 10px;
    border-radius: var(--border-radius-full);
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.project-tech-badge:hover {
    background-color: var(--badge-hover-bg);
    color: var(--accent-color);
}

/* Handled by global media query */

/* ==========================================================================
   CONTACT SECTION & FORM
   ========================================================================== */
.contact-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.contact-info h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.contact-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

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

.contact-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted) !important;
    font-size: 0.9rem;
    font-weight: 500;
    width: fit-content;
}

.contact-detail-item:hover {
    color: var(--accent-color) !important;
}

.contact-detail-item svg {
    width: 18px;
    height: 18px;
    color: var(--accent-color);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

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

.form-group label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    font-family: var(--font-primary);
    font-size: 0.925rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 10px 14px;
    color: var(--text-color);
    outline: none;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-status {
    font-size: 0.875rem;
    margin-top: 8px;
    font-weight: 500;
    display: none;
}

.form-status.info {
    display: block;
    color: var(--accent-color);
}

.form-status.success {
    display: block;
    color: #10b981;
    /* green-500 */
}

.form-status.error {
    display: block;
    color: #ef4444;
    /* red-500 */
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer-contact-section {
    width: 100%;
    background-color: var(--bg-color);
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
}

.footer-contact-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.footer {
    border-top: 1px solid var(--border-color);
    padding: 30px 24px;
    margin-top: 0;
    text-align: center;
    background-color: var(--bg-color);
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-design-credit {
    font-size: 0.75rem;
    color: var(--text-very-muted);
}

/* ==========================================================================
   ANIMATIONS & REVEALS
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVELAYOUTS)
   ========================================================================== */
@media (min-width: 600px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 768px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 24px;
    }

    .hero-location {
        justify-content: center;
    }

    .hero-highlights {
        justify-content: center;
    }

    .hero-social-links {
        justify-content: center;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .nav-menu {
        display: none;
        /* simple hidden links on small mobile, scroll will handle sections */
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .timeline-date {
        text-align: left;
    }
}

/* ==========================================================================
   PROJECT DETAILS DRAWER (RIGHT SIDEBAR)
   ========================================================================== */
body.drawer-open {
    overflow: hidden;
}

.project-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(3, 7, 18, 0.4);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

body.dark .project-drawer-overlay {
    background-color: rgba(0, 0, 0, 0.6);
}

.project-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.project-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 580px;
    height: 100%;
    background-color: var(--bg-color);
    border-left: 1px solid var(--border-color);
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color var(--transition-normal);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

body.dark .project-drawer {
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
}

.project-drawer.active {
    transform: translateX(0);
}

.drawer-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-fast);
}

.drawer-close:hover {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-hover);
}

.drawer-close svg {
    width: 16px;
    height: 16px;
}

.drawer-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.drawer-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.drawer-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 12px;
}

.drawer-badge.public {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.drawer-badge.private {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.drawer-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1.3;
    margin-bottom: 6px;
}

.drawer-subtitle {
    font-size: 0.825rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.4;
}

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

.drawer-body {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.drawer-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drawer-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-color);
}

.drawer-desc {
    font-size: 0.925rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.drawer-desc p {
    margin-top: 0;
    margin-bottom: 12px;
}

.drawer-desc p:last-child {
    margin-bottom: 0;
}

.drawer-bullets {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-bullets li {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.drawer-bullets li::marker {
    color: var(--accent-color);
}

.drawer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.drawer-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    background-color: var(--badge-bg);
    color: var(--badge-text);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-full);
}

/* Adjust project card for details click interaction */
.project-card {
    cursor: pointer;
}

.project-card .project-content {
    pointer-events: none;
    /* let click bubble up to card */
}

@media (max-width: 600px) {
    .project-drawer {
        max-width: 100%;
    }

    .drawer-header {
        padding: 24px 24px 16px;
    }

    .drawer-body {
        padding: 24px;
        gap: 20px;
    }

}

/* ==========================================================================
   BLOG GRID & CARDS
   ========================================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.blog-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.blog-thumbnail {
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.blog-thumbnail img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.blog-card:hover .blog-thumbnail img {
    transform: scale(1.03);
}

.blog-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-date {
    font-size: 0.75rem;
    color: var(--text-very-muted);
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.blog-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
}

.blog-card-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.blog-card-title a:hover {
    color: var(--accent-color);
}

.blog-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
}

.blog-read-more {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap var(--transition-fast);
}

.blog-read-more:hover {
    gap: 8px;
}

.blog-read-more i {
    width: 14px;
    height: 14px;
}

.no-posts-found {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-style: italic;
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px 0;
}

/* Spinner Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}

/* ==========================================================================
   SINGLE POST LAYOUT & STYLING
   ========================================================================== */
.single-post-wrapper {
    padding-top: 100px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.single-post {
    padding: 0 24px;
}

.post-header {
    max-width: 700px;
    margin: 0 auto 30px auto;
}

.post-header .post-date {
    font-size: 0.85rem;
    color: var(--text-very-muted);
    font-weight: 500;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 10px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.post-meta {
    display: flex;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.post-featured-image {
    max-width: 800px;
    margin: 0 auto 40px auto;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-footer {
    max-width: 700px;
    margin: 40px auto 0 auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-tags {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.post-footer .blog-read-more {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   BLOG POST CONTENT (TYPOGRAPHY & READABILITY)
   ========================================================================== */
.post-content {
    line-height: 1.8;
    font-size: 1.05rem;
    color: var(--text-color);
}

/* Headings inside content */
.post-content h2,
.post-content h3,
.post-content h4 {
    color: var(--text-color);
    font-weight: 700;
    margin-top: 36px;
    margin-bottom: 16px;
    line-height: 1.3;
}

.post-content h2 {
    font-size: 1.8rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.post-content h3 {
    font-size: 1.4rem;
}

.post-content h4 {
    font-size: 1.15rem;
}

/* Paragraphs and vertical spacing */
.post-content p {
    margin-bottom: 20px;
}

.post-content p:last-child {
    margin-bottom: 0;
}

/* Lists */
.post-content ul,
.post-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.post-content ul {
    list-style-type: disc;
}

.post-content ol {
    list-style-type: decimal;
}

.post-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.post-content li:last-child {
    margin-bottom: 0;
}

/* Blockquotes */
.post-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding: 12px 24px;
    margin: 32px 0;
    font-style: italic;
    background-color: var(--card-bg);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    color: var(--text-muted);
}

.post-content blockquote p {
    margin-bottom: 0;
}

/* Inline Code */
.post-content code {
    font-family: 'Geist Mono', monospace;
    font-size: 0.875rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: var(--border-radius-sm);
    color: var(--accent-color);
}

/* Code Blocks */
.post-content pre {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px;
    margin-top: 16px;
    margin-bottom: 24px;
    overflow-x: auto;
}

.post-content pre code {
    background-color: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.6;
    display: block;
}

/* Links inside posts */
.post-content a {
    color: var(--accent-color);
    text-decoration: underline;
    transition: color var(--transition-fast);
}

.post-content a:hover {
    color: var(--text-color);
}

/* Images & Figures */
.post-content figure,
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-md);
    margin: 32px auto;
    display: block;
}

.post-content figcaption {
    font-size: 0.85rem;
    color: var(--text-very-muted);
    text-align: center;
    margin-top: -24px;
    margin-bottom: 24px;
}

/* Tables */
.post-content table {
    width: 100%;
    margin-bottom: 24px;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.post-content th,
.post-content td {
    padding: 12px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.post-content th {
    background-color: var(--card-bg);
    font-weight: 600;
}

/* Horizontal Rules */
.post-content hr {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 40px 0;
}

/* ==========================================================================
   TESTIMONIALS SECTION
   ========================================================================== */
.testimonials-slider-wrapper {
    position: relative;
    width: 100%;
    margin-top: 40px;
}

.testimonials-slider {
    display: flex;
    align-items: flex-start; /* Prevent cards from stretching to match the tallest card */
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden; /* Prevent vertical scrolling */
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
    padding: 10px 4px 20px 4px; /* padding so card scale transitions and box-shadows don't clip */
    transition: height 0.3s ease;
}

.testimonials-slider::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari/Opera */
}

.testimonial-card {
    flex: 0 0 100%; /* Default 1 card per slide on mobile */
    scroll-snap-align: center;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 32px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.testimonial-quote-icon {
    color: var(--accent-color);
    opacity: 0.15;
    flex-shrink: 0;
}

.testimonial-quote-icon i,
.testimonial-quote-icon svg {
    width: 32px;
    height: 32px;
}

.testimonial-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 32px;
}

.testimonial-text p {
    margin-bottom: 16px;
}

.testimonial-text p:last-child {
    margin-bottom: 0;
}

.testimonial-client {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.testimonial-client-info {
    display: flex;
    align-items: center;
    gap: 16px;
}
.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-full);
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-avatar.default-avatar {
    background: var(--accent-gradient);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
}

.testimonial-meta {
    display: flex;
    flex-direction: column;
}

.testimonial-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.testimonial-role {
    font-size: 0.8rem;
    color: var(--text-very-muted);
    margin-top: 2px;
}

.testimonial-role a {
    color: var(--accent-color);
    text-decoration: none;
}

.testimonial-role a:hover {
    text-decoration: underline;
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.testimonial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--border-color);
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.testimonial-dot.active {
    background-color: var(--accent-color);
    transform: scale(1.2);
}