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

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100%;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, textarea, select {
    font-family: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

/* Typography Utility */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.4rem, 3vw, 1.8rem); }

/* Containers */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.main-content {
    flex-grow: 1;
    padding-top: var(--header-height); /* Nav height offset */
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: transform var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
    font-size: 0.95rem;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}

.btn-secondary {
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

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

.btn-link {
    color: var(--accent);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

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

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

.logo-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-gradient);
}

.logo-text span {
    color: var(--accent);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 6px 0;
}

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

.nav-link.active {
    color: var(--accent);
    font-weight: 600;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-normal);
    border-radius: 2px;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.theme-toggle-btn:hover {
    transform: rotate(15deg) scale(1.05);
}

html[data-theme="dark"] .moon-icon { display: none; }
html[data-theme="light"] .sun-icon { display: none; }

.menu-toggle-btn {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 80px;
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.dx-badge {
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    color: #ffffff;
    background: var(--accent-gradient);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

/* ==========================================================================
   HOME PAGE (HERO, SECTIONS)
   ========================================================================== */
.hero-section {
    padding: 100px 0 80px;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 40px;
}

.hero-content {
    max-width: 650px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background-color: var(--accent-light);
    color: var(--accent);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-title {
    margin-bottom: 20px;
}

.hero-title span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-visual-container {
    position: relative;
    width: 100%;
    max-width: 440px;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-glow-blob {
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(6, 182, 212, 0.15) 50%, rgba(0, 0, 0, 0) 70%);
    filter: blur(35px);
    animation: blobMorph 10s ease-in-out infinite alternate;
    z-index: 1;
    pointer-events: none;
}

.hero-code-card {
    position: relative;
    z-index: 2;
    width: 100%;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: floatCard 6s ease-in-out infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-code-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 30px 60px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

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

/* Code Card Interior styling */
.code-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 14px;
}

.code-card-dots {
    display: flex;
    gap: 8px;
}

.code-card-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-card-dots .dot.red { background-color: #ef4444; }
.code-card-dots .dot.yellow { background-color: #fbbf24; }
.code-card-dots .dot.green { background-color: #10b981; }

.code-card-title {
    font-family: monospace;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.code-card-body {
    font-family: 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
    margin-bottom: 28px;
}

.code-keyword { color: #c792ea; font-weight: bold; }
.code-variable { color: #82aaff; }
.code-property { color: #7fdbca; }
.code-string { color: #ecc48d; }

.code-card-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.code-card-tag {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #82aaff;
    border-radius: 20px;
    transition: all var(--transition-fast);
}

.code-card-tag:hover {
    background: rgba(99, 102, 241, 0.22);
    border-color: rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}

@keyframes blobMorph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 50% 50% 30% 70% / 50% 60% 40% 60%; }
    100% { border-radius: 70% 30% 50% 50% / 60% 30% 70% 40%; }
}

/* Sections Global */
.section {
    padding: 80px 0;
}

.section-header {
    margin-bottom: 48px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

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

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}

/* ==========================================================================
   CARDS (PROJECTS)
   ========================================================================== */
.project-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.project-card-image {
    height: 200px;
    background-color: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-card-image img {
    transform: scale(1.05);
}

.project-image-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    color: var(--accent);
    font-size: 3rem;
}

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

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

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

.project-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

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

.project-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.btn-project-detail {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-project-detail i {
    transition: transform var(--transition-fast);
}

.btn-project-detail:hover i {
    transform: translateX(4px);
}

.project-external-links {
    display: flex;
    gap: 12px;
}

.project-external-links .icon-link {
    color: var(--text-secondary);
    font-size: 1.15rem;
}

.project-external-links .icon-link:hover {
    color: var(--accent);
}

/* Search field customizations */
.search-input-wrapper {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.search-clear-btn {
    position: absolute;
    right: 12px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.search-clear-btn:hover {
    color: var(--accent);
    transform: scale(1.15);
}

/* ==========================================================================
   BLOG POST LIST & CARDS
   ========================================================================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}

.blog-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all var(--transition-normal);
}

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

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.blog-card-category {
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.blog-card-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

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

.blog-card-summary {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
}

/* ==========================================================================
   ABOUT / SOBRE PAGE
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 60px;
    align-items: flex-start;
}

.about-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.about-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 32px;
    text-align: center;
}

.about-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto 24px;
    background: var(--accent-gradient);
    padding: 4px;
    box-shadow: var(--shadow-md);
}

.about-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--accent);
}

.about-name {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.about-title {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
}

.about-info-list {
    text-align: left;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.about-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.about-info-item i {
    width: 20px;
    color: var(--accent);
}

.about-main h2 {
    margin-bottom: 20px;
}

.about-bio {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 32px;
}

.skills-container {
    margin-top: 40px;
}

.skills-category {
    margin-bottom: 28px;
}

.skills-category-title {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

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

.skill-tag {
    padding: 8px 16px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 550;
    transition: all var(--transition-fast);
}

.skill-tag:hover {
    border-color: var(--accent);
    background-color: var(--accent-light);
    color: var(--accent);
    transform: translateY(-2px);
}

/* ==========================================================================
   RESUME / CURRÍCULO PAGE
   ========================================================================== */
.resume-layout {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr;
    gap: 60px;
}

.resume-header-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 40px;
}

/* Timeline Layout */
.timeline-section {
    position: relative;
    margin-bottom: 48px;
}

.timeline-section-title {
    font-size: 1.5rem;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.timeline-section-title i {
    color: var(--accent);
}

.timeline {
    position: relative;
    padding-left: 28px;
}

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

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

.timeline-marker {
    position: absolute;
    top: 6px;
    left: -28px;
    bottom: -40px;
    width: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--bg-primary);
    border: 3px solid var(--accent);
    z-index: 2;
}

.timeline-line {
    width: 2px;
    flex-grow: 1;
    background-color: var(--border-color);
}

.timeline-item:last-child .timeline-line {
    display: none;
}

.timeline-content {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    transition: all var(--transition-normal);
}

.timeline-content:hover {
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-sm);
}

.timeline-date {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.timeline-role {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.timeline-company {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 12px;
}

.timeline-description {
    font-size: 0.92rem;
    color: var(--text-secondary);
}

/* Resume Sidebar (Education / Certifications) */
.resume-sidebar-section {
    margin-bottom: 40px;
}

.resume-sidebar-title {
    font-size: 1.25rem;
    margin-bottom: 24px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.edu-card {
    margin-bottom: 20px;
}

.edu-institution {
    font-weight: 700;
    font-size: 1rem;
}

.edu-degree {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.edu-year {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
}

/* ==========================================================================
   BLOG POST DETAIL PAGE
   ========================================================================== */
.post-detail-header {
    text-align: center;
    max-width: 800px;
    margin: 40px auto 40px;
}

.post-detail-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.post-detail-category {
    color: var(--accent);
    font-weight: 600;
}

.post-detail-title {
    margin-bottom: 24px;
    line-height: 1.2;
}

.post-detail-body {
    max-width: 740px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

.post-detail-body p {
    margin-bottom: 24px;
}

.post-detail-body h2 {
    font-size: 1.75rem;
    margin: 40px 0 20px;
    color: var(--text-primary);
}

.post-detail-body h3 {
    font-size: 1.35rem;
    margin: 32px 0 16px;
    color: var(--text-primary);
}

.post-detail-body ul, .post-detail-body ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.post-detail-body li {
    margin-bottom: 8px;
}

.post-detail-body blockquote {
    border-left: 4px solid var(--accent);
    padding: 8px 24px;
    margin: 24px 0;
    background-color: var(--bg-secondary);
    font-style: italic;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.post-detail-body code {
    font-size: 0.9rem;
    padding: 2px 6px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.post-detail-body pre code {
    padding: 0;
    border: none;
}

.post-detail-body pre {
    margin-bottom: 24px;
    border-radius: var(--border-radius-sm);
}

/* ==========================================================================
   CONTACT PAGE
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 60px;
}

.contact-info-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 40px;
    height: 100%;
}

.contact-info-title {
    margin-bottom: 16px;
}

.contact-info-text {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

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

.contact-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-detail-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-detail-content h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.contact-detail-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Contact Form */
.contact-form-container {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 40px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* Alerts / Responses */
@keyframes alertFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-alert {
    padding: 16px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 24px;
    font-size: 0.95rem;
    display: none;
    animation: alertFadeIn var(--transition-normal) forwards;
}

.form-alert.success {
    display: block;
    background-color: var(--toast-success-bg);
    color: var(--toast-success-text);
}

.form-alert.error {
    display: block;
    background-color: var(--toast-error-bg);
    color: var(--toast-error-text);
}

/* ==========================================================================
   404 ERROR PAGE
   ========================================================================== */
.error-page-container {
    text-align: center;
    padding: 100px 24px;
    max-width: 500px;
    margin: 0 auto;
}

.error-code {
    font-size: 7rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 16px;
}

.error-title {
    margin-bottom: 12px;
}

.error-description {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: opacity var(--transition-normal), visibility var(--transition-normal), transform var(--transition-normal), box-shadow var(--transition-fast);
    z-index: 999;
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.back-to-top-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* ==========================================================================
   LIGHT MODE CODE CARD ADJUSTMENTS
   ========================================================================== */
html[data-theme="light"] .hero-code-card {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

html[data-theme="light"] .hero-code-card:hover {
    box-shadow: 0 30px 60px rgba(79, 70, 229, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

html[data-theme="light"] .code-card-header {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .code-card-title {
    color: #64748b;
}

html[data-theme="light"] .code-card-body {
    color: #0f172a;
}

html[data-theme="light"] .code-keyword {
    color: #7c3aed;
    font-weight: bold;
}

html[data-theme="light"] .code-variable {
    color: #2563eb;
}

html[data-theme="light"] .code-property {
    color: #0d9488;
}

html[data-theme="light"] .code-string {
    color: #b45309;
}

html[data-theme="light"] .code-card-tag {
    background: rgba(79, 70, 229, 0.06);
    border: 1px solid rgba(79, 70, 229, 0.18);
    color: #4f46e5;
}

html[data-theme="light"] .code-card-tag:hover {
    background: rgba(79, 70, 229, 0.12);
    border-color: rgba(79, 70, 229, 0.35);
}

html[data-theme="light"] .hero-glow-blob {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.22) 0%, rgba(6, 182, 212, 0.08) 50%, rgba(0, 0, 0, 0) 70%);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 48px;
    }

    .hero-content {
        max-width: 100%;
        margin: 0 auto;
    }

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

    .about-grid, .resume-layout, .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .menu-toggle-btn {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--bg-surface);
        border-top: 1px solid var(--border-color);
        flex-direction: column;
        padding: 40px 24px;
        gap: 24px;
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
        z-index: 999;
    }

    .main-nav.open {
        transform: translateX(0);
    }

    .nav-link {
        font-size: 1.15rem;
        width: 100%;
        text-align: center;
        padding: 12px 0;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}
