:root {
    /* Premium Futuristic Palette */
    --premium-bg: #030712;
    --premium-surface: #0f172a;
    --premium-card: #1e293b;
    --premium-accent: #38bdf8;
    --premium-accent-glow: rgba(56, 189, 248, 0.3);
    --premium-silver: #e2e8f0;
    --premium-text: #f8fafc;
    --premium-text-muted: #94a3b8;
    --premium-border: rgba(226, 232, 240, 0.1);

    /* Semantic Color Mapping - Dark Mode Default */
    --color-background: var(--premium-bg);
    --color-surface: var(--premium-surface);
    --color-text: var(--premium-text);
    --color-text-secondary: var(--premium-text-muted);
    --color-primary: var(--premium-accent);
    --color-primary-hover: #7dd3fc;
    --color-primary-active: #0ea5e9;
    --color-secondary: rgba(226, 232, 240, 0.05);
    --color-secondary-hover: rgba(226, 232, 240, 0.1);
    --color-border: var(--premium-border);
    --color-card-border: var(--premium-border);
    --color-card-border-inner: rgba(255, 255, 255, 0.05);

    /* Preserving variables for article.css compatibility */
    --color-slate-500-rgb: 148, 163, 184;
    --color-teal-500-rgb: 56, 189, 248;
    --color-teal-300-rgb: 125, 211, 252;
    --color-red-500-rgb: 239, 68, 68;
    --color-orange-500-rgb: 249, 115, 22;

    /* Typography - Premium Stack */
    --font-family-base: "Comfortaa", "Outfit", "Segoe UI", sans-serif;
    --font-family-mono: "Space Mono", monospace;
    --font-heading: "Comfortaa", var(--font-family-base);

    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 32px;
    --font-size-4xl: 48px;
    --font-size-5xl: 64px;
    --font-size-6xl: 96px;
    --font-size-7xl: 128px;

    /* Spacing & Layout */
    --space-1: 2px;
    --space-4: 4px;
    --space-6: 6px;
    --space-8: 8px;
    --space-10: 10px;
    --space-12: 12px;
    --space-14: 14px;
    --space-16: 16px;
    --space-20: 20px;
    --space-24: 24px;
    --space-32: 32px;
    --space-40: 40px;
    --space-48: 48px;
    --space-64: 64px;

    --radius-sm: 6px;
    --radius-md: 16px;
    --radius-base: 12px;
    --radius-lg: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* Semantic Typography */
    --line-height-tight: 1.25;
    --line-height-normal: 1.6;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --letter-spacing-tight: -0.025em;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);

    /* Container Dimensions */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1400px;
    /* Increased for wider profile match */

    /* Sophisticated Animation */
    --duration-fast: 0.2s;
    --duration-normal: 0.6s;
    --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
    --transition: all var(--duration-normal) var(--ease-premium);
}


/* ==================== Global Reset & Typography ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
}

body {
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-family-base);
    font-weight: 300;
    line-height: var(--line-height-normal);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

/* ==================== Ambient Background ==================== */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #0f172a 0%, #030712 100%);
}

.ambient-glow {
    position: absolute;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

/* ==================== Header & Navigation ==================== */
.header {
    font-family: 'Outfit', sans-serif;
    position: fixed;
    top: 2rem;
    right: 0;
    left: auto !important;
    transform: none !important;
    display: flex;
    justify-content: flex-end;
    width: fit-content;
    z-index: 1000;
    padding: 10px 0 10px 22px;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(40px);
    border: 1px solid var(--premium-border);
    border-right: none;
    /* Open end mouth look */
    border-radius: 40px 0 0 40px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -20px 20px 60px rgba(0, 0, 0, 0.7);
    /* Slide-in animation on page load */
    animation: headerSlideIn 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes headerSlideIn {
    0% {
        right: -100%;
        opacity: 0;
    }

    100% {
        right: 0;
        opacity: 1;
    }
}

/* .header.scrolled {
    top: 1.5rem;
    background: rgba(3, 7, 18, 0.95);
    padding: 8px 0 8px 32px;
} */

.header-container {
    display: flex;
    align-items: center;
    padding-right: 24px;
    /* Some padding for the last link */
}


.logo-text {
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: 2px;
}

.logo-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    margin-left: 2px;
    box-shadow: 0 0 10px var(--color-primary);
}

.nav-menu {
    display: flex;
    gap: var(--space-32);
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-medium);
    position: relative;
    overflow: hidden;
    padding: 0;
    padding-bottom: 8px;
    /* Add gap between text and underline */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
    text-decoration: none;
    display: inline-block;
    outline: none;
}

.nav-btn:focus-visible {
    outline: none;
}

/* Prevent rendering artifacts */
.nav-btn,
.btn,
.btn-primary {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.nav-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    /* Moved down from top due to padding */
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-primary);
    opacity: 0;
    /* Start invisible */
    transform: translate3d(-100%, 0, 0);
    transition: opacity 0.1s ease, transform 0.3s ease-out;
    transition-delay: 0.2s;
    /* Wait 0.5s before animation starts */
}

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

.nav-btn:hover::after,
.nav-btn.active::after {
    opacity: 1;
    /* Fade in after 0.5s delay */
    transform: translate3d(0, 0, 0);
    /* Slide in from left */
}


/* Data attribute for manual theme switching */
[data-color-scheme="dark"] {
    /* RGB versions for opacity control (dark mode) */
    --color-gray-400-rgb: 119, 124, 124;
    --color-teal-300-rgb: 50, 184, 198;
    --color-gray-300-rgb: 167, 169, 169;
    --color-gray-200-rgb: 245, 245, 245;

    /* Colorful background palette - Dark Mode */
    --color-bg-1: rgba(29, 78, 216, 0.15);
    /* Dark blue */
    --color-bg-2: rgba(180, 83, 9, 0.15);
    /* Dark yellow */
    --color-bg-3: rgba(21, 128, 61, 0.15);
    /* Dark green */
    --color-bg-4: rgba(185, 28, 28, 0.15);
    /* Dark red */
    --color-bg-5: rgba(107, 33, 168, 0.15);
    /* Dark purple */
    --color-bg-6: rgba(194, 65, 12, 0.15);
    /* Dark orange */
    --color-bg-7: rgba(190, 24, 93, 0.15);
    /* Dark pink */
    --color-bg-8: rgba(8, 145, 178, 0.15);
    /* Dark cyan */

    /* Semantic Color Tokens (Dark Mode) */
    --color-background: var(--color-charcoal-700);
    --color-surface: var(--color-charcoal-800);
    --color-text: var(--color-gray-200);
    --color-text-secondary: rgba(var(--color-gray-300-rgb), 0.7);
    --color-primary: var(--color-teal-300);
    --color-primary-hover: var(--color-teal-400);
    --color-primary-active: var(--color-teal-800);
    --color-secondary: rgba(var(--color-gray-400-rgb), 0.15);
    --color-secondary-hover: rgba(var(--color-gray-400-rgb), 0.25);
    --color-secondary-active: rgba(var(--color-gray-400-rgb), 0.3);
    --color-border: rgba(var(--color-gray-400-rgb), 0.3);
    --color-error: var(--color-red-400);
    --color-success: var(--color-teal-300);
    --color-warning: var(--color-orange-400);
    --color-info: var(--color-gray-300);
    --color-focus-ring: rgba(var(--color-teal-300-rgb), 0.4);
    --color-btn-primary-text: var(--color-slate-900);
    --color-card-border: rgba(var(--color-gray-400-rgb), 0.15);
    --color-card-border-inner: rgba(var(--color-gray-400-rgb), 0.15);
    --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    --color-border-secondary: rgba(var(--color-gray-400-rgb), 0.2);
    --color-select-caret: rgba(var(--color-gray-200-rgb), 0.8);

    /* Common style patterns - updated for dark mode */
    --focus-ring: 0 0 0 3px var(--color-focus-ring);
    --focus-outline: 2px solid var(--color-primary);
    --status-bg-opacity: 0.15;
    --status-border-opacity: 0.25;
    --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

    /* RGB versions for dark mode */
    --color-success-rgb: var(--color-teal-300-rgb);
    --color-error-rgb: var(--color-red-400-rgb);
    --color-warning-rgb: var(--color-orange-400-rgb);
    --color-info-rgb: var(--color-gray-300-rgb);
}

[data-color-scheme="light"] {
    /* RGB versions for opacity control (light mode) */
    --color-brown-600-rgb: 94, 82, 64;
    --color-teal-500-rgb: 33, 128, 141;
    --color-slate-900-rgb: 19, 52, 59;

    /* Semantic Color Tokens (Light Mode) */
    --color-background: var(--color-cream-50);
    --color-surface: var(--color-cream-100);
    --color-text: var(--color-slate-900);
    --color-text-secondary: var(--color-slate-500);
    --color-primary: var(--color-teal-500);
    --color-primary-hover: var(--color-teal-600);
    --color-primary-active: var(--color-teal-700);
    --color-secondary: rgba(var(--color-brown-600-rgb), 0.12);
    --color-secondary-hover: rgba(var(--color-brown-600-rgb), 0.2);
    --color-secondary-active: rgba(var(--color-brown-600-rgb), 0.25);
    --color-border: rgba(var(--color-brown-600-rgb), 0.2);
    --color-btn-primary-text: var(--color-cream-50);
    --color-card-border: rgba(var(--color-brown-600-rgb), 0.12);
    --color-card-border-inner: rgba(var(--color-brown-600-rgb), 0.12);
    --color-error: var(--color-red-500);
    --color-success: var(--color-teal-500);
    --color-warning: var(--color-orange-500);
    --color-info: var(--color-slate-500);
    --color-focus-ring: rgba(var(--color-teal-500-rgb), 0.4);

    /* RGB versions for light mode */
    --color-success-rgb: var(--color-teal-500-rgb);
    --color-error-rgb: var(--color-red-500-rgb);
    --color-warning-rgb: var(--color-orange-500-rgb);
    --color-info-rgb: var(--color-slate-500-rgb);
}

/* Base styles */
html {
    font-size: var(--font-size-base);
    font-family: var(--font-family-base);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--color-text);
    letter-spacing: var(--letter-spacing-tight);
}

h1 {
    font-size: var(--font-size-4xl);
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

h5 {
    font-size: var(--font-size-lg);
}

h6 {
    font-size: var(--font-size-md);
}

p {
    margin: 0 0 var(--space-16) 0;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-standard);
}

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

code,
pre {
    font-family: var(--font-family-mono);
    font-size: calc(var(--font-size-base) * 0.95);
    background-color: var(--color-secondary);
    border-radius: var(--radius-lg);
}

code {
    padding: var(--space-1) var(--space-4);
}

pre {
    padding: var(--space-16);
    margin: var(--space-16) 0;
    overflow: auto;
    border: 1px solid var(--color-border);
}

pre code {
    background: none;
    padding: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-16);
    border-radius: var(--radius-base);
    font-size: var(--font-size-base);
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease;
    border: none;
    text-decoration: none;
    position: relative;
}

.btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

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

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

.btn--primary:active {
    background: var(--color-primary-active);
}

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

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

.btn--secondary:active {
    background: var(--color-secondary-active);
}

.btn--outline {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

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

.btn--sm {
    padding: var(--space-4) var(--space-12);
    font-size: var(--font-size-sm);
    border-radius: var(--radius-sm);
}

.btn--lg {
    padding: var(--space-10) var(--space-20);
    font-size: var(--font-size-lg);
    border-radius: var(--radius-md);
}

.btn--full-width {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Form elements */
.form-control {
    display: block;
    width: 100%;
    padding: var(--space-8) var(--space-12);
    font-size: var(--font-size-md);
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-base);
    transition: border-color var(--duration-fast) var(--ease-standard),
        box-shadow var(--duration-fast) var(--ease-standard);
}

textarea.form-control {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
}

select.form-control {
    padding: var(--space-8) var(--space-12);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: var(--select-caret-light);
    background-repeat: no-repeat;
    background-position: right var(--space-12) center;
    background-size: 16px;
    padding-right: var(--space-32);
}

/* Add a dark mode specific caret */
@media (prefers-color-scheme: dark) {
    select.form-control {
        background-image: var(--select-caret-dark);
    }
}

/* Also handle data-color-scheme */
[data-color-scheme="dark"] select.form-control {
    background-image: var(--select-caret-dark);
}

[data-color-scheme="light"] select.form-control {
    background-image: var(--select-caret-light);
}

.form-control:focus {
    border-color: var(--color-primary);
    outline: var(--focus-outline);
}

.form-label {
    display: block;
    margin-bottom: var(--space-8);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
}

.form-group {
    margin-bottom: var(--space-16);
}

/* Card component */
.card {
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-card-border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--duration-normal) var(--ease-standard);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card__body {
    padding: var(--space-16);
}

.card__header,
.card__footer {
    padding: var(--space-16);
    border-bottom: 1px solid var(--color-card-border-inner);
}

/* Status indicators - simplified with CSS variables */
.status {
    display: inline-flex;
    align-items: center;
    padding: var(--space-6) var(--space-12);
    border-radius: var(--radius-full);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
}

.status--success {
    background-color: rgba(var(--color-success-rgb, 33, 128, 141),
            var(--status-bg-opacity));
    color: var(--color-success);
    border: 1px solid rgba(var(--color-success-rgb, 33, 128, 141), var(--status-border-opacity));
}

.status--error {
    background-color: rgba(var(--color-error-rgb, 192, 21, 47),
            var(--status-bg-opacity));
    color: var(--color-error);
    border: 1px solid rgba(var(--color-error-rgb, 192, 21, 47), var(--status-border-opacity));
}

.status--warning {
    background-color: rgba(var(--color-warning-rgb, 168, 75, 47),
            var(--status-bg-opacity));
    color: var(--color-warning);
    border: 1px solid rgba(var(--color-warning-rgb, 168, 75, 47), var(--status-border-opacity));
}

.status--info {
    background-color: rgba(var(--color-info-rgb, 98, 108, 113),
            var(--status-bg-opacity));
    color: var(--color-info);
    border: 1px solid rgba(var(--color-info-rgb, 98, 108, 113), var(--status-border-opacity));
}

/* Container layout */
.container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: var(--space-16);
    padding-left: var(--space-16);
}

@media (min-width: 640px) {
    .container {
        max-width: var(--container-sm);
    }
}

@media (min-width: 768px) {
    .container {
        max-width: var(--container-md);
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: var(--container-xl);
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: var(--container-xl);
    }
}

/* Utility classes */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

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

.justify-between {
    justify-content: space-between;
}

.gap-4 {
    gap: var(--space-4);
}

.gap-8 {
    gap: var(--space-8);
}

.gap-16 {
    gap: var(--space-16);
}

.m-0 {
    margin: 0;
}

.mt-8 {
    margin-top: var(--space-8);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.mx-8 {
    margin-left: var(--space-8);
    margin-right: var(--space-8);
}

.my-8 {
    margin-top: var(--space-8);
    margin-bottom: var(--space-8);
}

.p-0 {
    padding: 0;
}

.py-8 {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
}

.px-8 {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
}

.py-16 {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
}

.px-16 {
    padding-left: var(--space-16);
    padding-right: var(--space-16);
}

.block {
    display: block;
}

.hidden {
    display: none;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:focus-visible {
    outline: var(--focus-outline);
    outline-offset: 2px;
}

/* Dark mode specifics */
[data-color-scheme="dark"] .btn--outline {
    border: 1px solid var(--color-border-secondary);
}

@font-face {
    font-family: 'FKGroteskNeue';
    src: url('https://r2cdn.perplexity.ai/fonts/FKGroteskNeue.woff2') format('woff2');
}


/* ==================== Global Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: var(--color-primary);
    --secondary-color: var(--color-primary-hover);
    --accent-color: var(--color-primary-active);
    --dark-bg: var(--color-background);
    --darker-bg: var(--color-surface);
    --card-bg: var(--color-surface);
    --text-primary: var(--color-text);
    --text-secondary: var(--color-text-secondary);
    --border-color: var(--color-border);
    --transition: var(--duration-normal) var(--ease-standard);
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
    font-family: var(--font-family-base);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background-color: var(--color-background);
}

body {
    font-family: var(--font-family-base);
    background: var(--color-background);
    color: var(--text-primary);
    line-height: var(--line-height-normal);
    overflow-x: hidden;
}

/* ==================== Centralized Button Animations ==================== */
.btn,
.back-link,
.read-more,
.btn-primary,
.btn-secondary,
.btn-outline,
.contact-link,
.submit-btn,
.project-card,
.blog-card,
.skill-card,
.stat-item,
.floating-card {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        background-color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        color 0.3s ease !important;
}

.back-link:hover,
/* .read-more:hover, */
.contact-link:hover,
.project-card:hover,
.blog-card:hover,
.skill-card:hover,
.stat-item:hover,
.floating-card:hover {
    transform: scale(1.05) !important;
    background: rgba(255, 255, 255, 0.05);
    /* Glass effect base */
    backdrop-filter: blur(4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10;
}


.read-more:hover {
    color: var(--color-primary-hover);
    /* Color change only, no transform */
}

/* Specific overrides for primary buttons to maintain visibility */
.btn-primary:hover,
.btn--primary:hover {
    background: var(--color-primary) !important;
    /* Keep primary color but add scale/shadow */
    opacity: 0.9;
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.3);
    /* Coloured shadow for primary */
}

/* ==================== Header Navigation ==================== */
/* Removed redundant header styles */

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
}

.logo-text {
    color: var(--color-primary);
    animation: glow 2s ease-in-out infinite;
}

.logo-dot {
    width: 12px;
    height: 12px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    animation: pulse 1.5s ease-in-out infinite;
}

.nav-menu {
    display: flex;
    gap: var(--space-32);
}

/* Duplicate .nav-btn styles removed - now consolidated in header section above */

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    gap: var(--space-6);
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: var(--radius-sm);
    transition: all var(--duration-normal) var(--ease-standard);
}

/* ==================== Main Content - FIXED VISIBILITY ==================== */
.main-content {
    width: 100%;
}

.section {
    width: 100%;
    min-height: auto;
    padding: 60px 32px 40px;
    /* Aligned for better content density while keeping header clearance */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    scroll-margin-top: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(var(--space-20));
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section.active {
    animation: fadeIn 0.6s var(--ease-standard);
}

.container {
    max-width: var(--container-xl);
    width: 100%;
    margin: 0 auto;
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: calc(var(--space-16) * 3);
    text-align: left;
    /* Left align */
    color: var(--color-primary);
    letter-spacing: var(--letter-spacing-tight);
    margin-right: 0;
    /* Remove offset */
    padding-left: 0;
    /* Align with container edge */
    width: 100%;
}


/* ==================== Hero Section ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 120px;
    padding-bottom: var(--space-32);
    padding-left: var(--space-32);
    padding-right: var(--space-32);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, var(--color-secondary) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, var(--color-secondary-hover) 0%, transparent 50%);
    pointer-events: none;
    animation: bgShift 15s ease-in-out infinite;
    opacity: 0.3;
}

@keyframes bgShift {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.15;
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--space-32) * 2);
    max-width: var(--container-lg);
    width: 100%;
    align-items: center;
    z-index: 2;
}

.hero-text {
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-16);
    color: var(--color-primary);
    letter-spacing: var(--letter-spacing-tight);
}

.gradient-text {
    display: inline-block;
}

.word-rotate {
    display: inline-block;
    position: relative;
    min-width: 200px;
    height: 1.2em;
    color: var(--color-primary-hover);
}

.word-rotate span {
    position: absolute;
    opacity: 0;
    animation: wordRotate 8s infinite;
}

.word-rotate span:nth-child(1) {
    animation-delay: 0s;
}

.word-rotate span:nth-child(2) {
    animation-delay: 2.67s;
}

.word-rotate span:nth-child(3) {
    animation-delay: 5.34s;
}

@keyframes wordRotate {

    0%,
    10% {
        opacity: 1;
        animation-timing-function: ease-in;
    }

    20%,
    90% {
        opacity: 0;
        animation-timing-function: ease-out;
    }

    100% {
        opacity: 0;
    }
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--color-primary);
    margin-bottom: var(--space-16);
    font-weight: var(--font-weight-semibold);
}

.hero-description {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-32);
    max-width: 500px;
    line-height: var(--line-height-normal);
}

.hero-cta {
    display: flex;
    gap: var(--space-24);
}

.btn {
    padding: var(--space-12) var(--space-32);
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: var(--radius-full);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease, opacity 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: var(--font-family-base);
}

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

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

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

.btn-secondary:hover {
    background: rgba(56, 189, 248, 0.1);
}

/* ==================== Hero Visual ==================== */
.hero-visual {
    position: relative;
    height: 400px;
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animated-background {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: var(--color-secondary);
    border: 2px solid var(--border-color);
}

.glow-sphere {
    position: absolute;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--color-secondary-hover), transparent);
    border-radius: var(--radius-full);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(40px);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translate(-50%, -50%) translateY(0px);
    }

    50% {
        transform: translate(-50%, -50%) translateY(-20px);
    }
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.floating-card {
    position: absolute;
    width: 120px;
    height: 120px;
    background: var(--color-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.4s ease;
    animation: floatCard 4s ease-in-out infinite;
    box-shadow: var(--shadow-sm);
    z-index: 10;
}


.card-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-8);
}

.card-icon {
    font-size: calc(var(--font-size-base) * 2.5);
}

.floating-card p {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin: 0;
    font-weight: var(--font-weight-medium);
}

.card-1 {
    top: 10%;
    left: 50%;
    margin-left: -60px;
    animation-delay: 0s;
}

.card-2 {
    top: 60%;
    right: 10%;
    animation-delay: 1s;
}

.card-3 {
    top: 60%;
    left: 10%;
    animation-delay: 2s;
}

/* ==================== Scroll Indicator ==================== */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-32);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-8);
    color: var(--text-secondary);
    animation: bounce 2s ease-in-out infinite;
}

.scroll-icon {
    width: 24px;
    height: 24px;
    stroke: var(--primary-color);
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* ==================== About Section ==================== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--space-32) * 2);
    align-items: center;
    /* Center vertically if needed, or start */
    width: 100%;
}

.about-text p {
    font-size: var(--font-size-lg);
    line-height: 1.8;
    margin-bottom: var(--space-32);
    color: var(--text-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-24);
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: var(--space-24);
    border-radius: var(--radius-base);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.4s ease;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    height: 100%;
    /* Ensure equal height */
}


.skill-card h3 {
    color: var(--primary-color);
    margin-bottom: var(--space-8);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
}

.skill-card p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2x2 Grid */
    gap: var(--space-24);
    justify-content: center;
    width: 100%;
}

.stat-item {
    text-align: center;
    padding: var(--space-32);
    /* Increase padding for consistent box size */
    background: var(--card-bg);
    /* Use card bg for consistency */
    border: 1px solid var(--premium-border);
    border-radius: var(--radius-lg);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.4s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1.2;
    /* Enforce consistent shape, e.g. slightly rectangular or square */
    height: 100%;
}


.stat-number {
    display: block;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    margin-bottom: var(--space-4);
}

.stat-label {
    display: block;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    white-space: nowrap;
}

/* ==================== Hero Section ==================== */
/* Consolidated Hero with Section above */

.hero-content {
    max-width: var(--container-xl);
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-64);
    align-items: flex-start;
    /* Start from the new 2rem baseline */
    padding-top: 2rem;
    /* Additional breathing room for hero specific typography */
    z-index: 10;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.1;
    margin-bottom: var(--space-24);
    color: var(--color-text);
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary), #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

.hero-description {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    max-width: 540px;
    margin-bottom: var(--space-48);
    line-height: 1.7;
}

/* ==================== Hero Refinements ==================== */
.hero-badge {
    display: inline-block;
    padding: var(--space-8) var(--space-16);
    background: rgba(56, 189, 248, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--color-primary);
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-24);
}

.highlight-text {
    color: var(--premium-text-muted);
}

.visual-panel {
    background: #0f172a;
    border: 1px solid var(--premium-border);
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.panel-header {
    background: #1e293b;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--premium-border);
}

.panel-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.panel-title {
    margin-left: 12px;
    font-size: 11px;
    color: var(--premium-text-muted);
    font-family: var(--font-family-mono);
}

.panel-content {
    padding: 30px;
    font-family: var(--font-family-mono);
    font-size: 14px;
    line-height: 1.6;
}

.code-line {
    display: block;
}

.code-keyword {
    color: #f472b6;
}

.code-func {
    color: #38bdf8;
}

.code-comment {
    color: #64748b;
    font-style: italic;
}

.code-const {
    color: #fbbf24;
}

.code-str {
    color: #34d399;
}

.visual-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.1) 0%, transparent 60%);
    z-index: 1;
    pointer-events: none;
}

.hero-cta {
    display: flex;
    gap: var(--space-24);
}

.btn {
    padding: 16px 36px;
    border-radius: 8px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: transparent;
    z-index: 1;
}

.btn-primary {
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    outline: none;
}

.btn-primary:hover {
    background: var(--color-primary);
    color: var(--premium-bg);
}

.btn-primary:focus,
.btn-primary:focus-visible {
    outline: none;
    box-shadow: none;
}

.btn-secondary {
    border: 1px solid var(--premium-border);
    color: var(--color-text);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-primary);
}

/* ==================== Circuit Matrix Animation ==================== */
.hero-visual {
    position: relative;
    z-index: 10;
}

.circuit-container {
    width: 100%;
    max-width: 500px;
    height: 380px;
    background: #0f172a;
    /* Slate 900 */
    border: 1px solid rgba(56, 189, 248, 0.4);
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 0 50px rgba(56, 189, 248, 0.1), inset 0 0 20px rgba(56, 189, 248, 0.05);
    backdrop-filter: blur(10px);
}

#hero-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slider-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 30%, rgba(3, 7, 18, 0.4) 100%);
    pointer-events: none;
}

.visual-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

/* ==================== Sections & Titles ==================== */
/* Standardized padding handled above */

.section-title {
    font-size: var(--font-size-3xl);
    text-align: left;
    margin-bottom: var(--space-64);
    color: var(--color-text);
    position: relative;
    width: fit-content;
    /* Sizing to content for dynamic underline */
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 0;
    /* Align left */
    transform: none;
    /* Remove center transform */
    width: 100%;
    /* Dynamic full width */
    height: 2px;
    background: var(--color-primary);
}

/* ==================== Project & Blog Cards ==================== */
.projects-grid,
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-24);
    width: 100%;
}

.project-card,
.blog-card {
    background: var(--premium-surface);
    border: 1px solid var(--premium-border);
    border-radius: var(--radius-lg);
    padding: 0;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
        border-color 0.4s ease,
        box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card:hover,
.blog-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 8px 32px rgba(56, 189, 248, 0.15);
}


/* ==================== Premium Reveal Animations ==================== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-premium), transform 0.8s var(--ease-premium);
    will-change: opacity, transform;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Specific delays for hero content */
.hero-content>*:nth-child(1) {
    transition-delay: 0.1s;
}

.hero-content>*:nth-child(2) {
    transition-delay: 0.2s;
}

.project-card,
.blog-card,
.btn,
.nav-btn {
    will-change: transform;
}



.project-image {
    width: 100%;
    height: 140px;
    background: var(--color-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--premium-border);
    position: relative;
    overflow: hidden;
}

.project-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-normal) var(--ease-standard);
}

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

.project-info {
    padding: var(--space-16);
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.project-info h3 {
    color: var(--color-text);
    margin-bottom: 0;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
    line-height: 1.3;
}

.project-info p {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-tags {
    display: flex;
    gap: var(--space-8);
    flex-wrap: wrap;
}

.tag {
    background: var(--color-secondary);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: var(--space-4) var(--space-12);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
}

/* Duplicates removed - using primary definition in layout section */

.blog-card {
    background: var(--premium-surface);
    border: 1px solid var(--premium-border);
    padding: var(--space-20);
    border-radius: var(--radius-lg);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
        border-color 0.4s ease,
        box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.blog-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 8px 32px rgba(56, 189, 248, 0.15);
}

.blog-date {
    color: var(--color-primary);
    font-size: var(--font-size-xs);
    margin-bottom: 0;
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-card h3 {
    color: var(--color-text);
    margin-bottom: 0;
    line-height: 1.3;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
}

.blog-card p {
    color: var(--color-text-secondary);
    margin-bottom: 0;
    font-size: var(--font-size-sm);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;
    font-weight: var(--font-weight-semibold);
}

.read-more:hover {
    color: var(--color-primary-hover);
}

/* ==================== Resume Section - Mosaic Layout ==================== */
.section-resume {
    background: linear-gradient(180deg, transparent 0%, rgba(56, 189, 248, 0.02) 50%, transparent 100%);
}

.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-32);
    flex-wrap: wrap;
    gap: var(--space-16);
}

.resume-header .section-title {
    margin-bottom: 0;
}

.resume-header .section-title::after {
    display: none;
}

/* Mosaic Grid - True Asymmetric Bento */
.resume-mosaic {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-20);
}

/* Row 1: Education (small 2/5) | Skills (large 3/5) */
.resume-edu {
    grid-column: 1 / 3;
    grid-row: 1;
}

.resume-skills {
    grid-column: 3 / 6;
    grid-row: 1;
}

/* Row 2: Experience (large 3/5) | Highlights (small 2/5) */
.resume-exp {
    grid-column: 1 / 4;
    grid-row: 2;
}

.resume-cert {
    grid-column: 4 / 6;
    grid-row: 2;
}

@media (max-width: 768px) {
    .resume-mosaic {
        grid-template-columns: 1fr;
    }

    .resume-edu,
    .resume-skills,
    .resume-exp,
    .resume-cert {
        grid-column: 1;
        grid-row: auto;
    }
}

/* Right-align Skills and Highlights headers */
.resume-skills .resume-card-header,
.resume-cert .resume-card-header {
    justify-content: flex-end;
}

/* Card Base - Compact */
.resume-card {
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.08);
    border-radius: var(--radius-base);
    overflow: hidden;
    transition: all 0.3s ease;
}

.resume-card:hover {
    border-color: rgba(56, 189, 248, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.resume-card-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-12);
    padding: var(--space-16);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.06), transparent);
    border-bottom: 1px solid rgba(56, 189, 248, 0.08);
}

.resume-card-icon {
    font-size: 1.2rem;
}

.resume-card-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.resume-card-body {
    padding: var(--space-16);
    text-align: left;
}

/* Right-align Skills and Highlights cards */
.resume-skills .resume-card-body,
.resume-cert .resume-card-body {
    text-align: right;
}

/* Compact Timeline - Default horizontal */
.resume-card .timeline-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-12);
    padding-bottom: var(--space-12);
    margin-bottom: var(--space-12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    text-align: left;
}

.resume-card .timeline-item:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.timeline-dot {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
    box-shadow: 0 0 8px var(--color-primary);
}

.resume-card .timeline-content {
    flex: 1;
}

.resume-card .timeline-content h4 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 2px;
}

.timeline-date {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: var(--color-primary);
    background: rgba(56, 189, 248, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-6);
    letter-spacing: 0.3px;
}

.resume-card .timeline-content p {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Skills Tags */
.skills-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--space-8);
}

.skill-tag {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--color-primary);
    background: rgba(56, 189, 248, 0.1);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(56, 189, 248, 0.15);
    transition: all 0.2s ease;
}

.skill-tag:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.3);
}

/* Highlights */
.highlight-list {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-12);
}

.highlight-item {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text);
    padding-left: var(--space-20);
    position: relative;
    text-align: left;
}

.highlight-item::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: 700;
}

/* Keep old styles for backward compatibility */
.resume-content {
    max-width: 100%;
    margin: 0;
}

.resume-section {
    margin-bottom: calc(var(--space-16) * 3);
}

.resume-heading {
    color: var(--primary-color);
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-32);
    font-weight: var(--font-weight-bold);
    padding-bottom: var(--space-16);
    border-bottom: 2px solid var(--border-color);
}

.resume-actions {
    text-align: center;
    margin-top: calc(var(--space-16) * 3);
}

/* ==================== Contact Section ==================== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    /* Left side slightly smaller, Right side for form */
    gap: var(--space-64);
    width: 100%;
    max-width: 100%;
    /* Full width to align with header */
    background: rgba(255, 255, 255, 0.03);
    /* More transparent for glassmorphism */
    padding: var(--space-48);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--premium-border);
    backdrop-filter: blur(40px);
    margin: 0;
    /* Align left */
}

.contact-info p {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-32);
    line-height: var(--line-height-normal);
    text-align: left;
    /* Align text left as requested */
}

.contact-links {
    display: grid;
    grid-template-columns: 1fr;
    /* Stack vertically */
    gap: var(--space-16);
    width: 100%;
    margin-bottom: 0;
}

.contact-link {
    display: flex;
    flex-direction: row;
    /* Horizontal layout for rectangular button */
    align-items: center;
    justify-content: flex-start;
    /* Left align content */
    gap: var(--space-24);
    color: var(--text-primary);
    text-decoration: none;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.4s ease;
    padding: var(--space-16) var(--space-32);
    /* Rectangular padding */
    border-radius: var(--radius-lg);
    /* Slightly less rounded */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--premium-border);
    min-height: 80px;
    /* Standard button height */
    text-align: left;
    width: 100%;
}


.link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    /* Smaller icon */
    height: 32px;
    color: var(--primary-color);
    transition: transform var(--duration-normal) var(--ease-standard);
    flex-shrink: 0;
}

.contact-link span:not(.link-icon) {
    font-size: var(--font-size-sm);
    word-break: break-all;
    /* Prevent overflow */
    font-weight: 500;
    line-height: 1.4;
}

.contact-link:hover .link-icon {
    transform: scale(1.1);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-24);
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-24);
}

@media (max-width: 900px) {

    /* Breakpoint for 2-column layout */
    .contact-content {
        grid-template-columns: 1fr;
        /* Stack on tablet/mobile */
        gap: var(--space-32);
        padding: var(--space-24);
    }

    .contact-links {
        grid-template-columns: 1fr;
        /* Force stack on tablet/mobile too */
    }
}

@media (max-width: 768px) {
    .contact-links {
        grid-template-columns: 1fr;
        /* Stack buttons on mobile */
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}


.form-group {
    display: flex;
    width: 100%;
    /* Ensure form groups take full width */
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: var(--space-16);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-base);
    color: var(--text-primary);
    font-family: var(--font-family-base);
    font-size: var(--font-size-md);
    transition: all var(--duration-normal) var(--ease-standard);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-secondary);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: var(--focus-outline);
    border-color: var(--primary-color);
    background: var(--color-secondary);
    box-shadow: var(--focus-ring);
}

/* ==================== Footer ==================== */
.footer {
    background: var(--color-surface);
    border-top: 1px solid var(--border-color);
    padding: var(--space-32);
    text-align: center;
}

.footer-content {
    max-width: var(--container-lg);
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-32);
    margin-top: var(--space-16);
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--duration-normal) var(--ease-standard);
    font-size: var(--font-size-md);
}

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

/* ==================== Animations ==================== */
@keyframes glow {

    0%,
    100% {
        filter: drop-shadow(0 0 10px var(--primary-color));
    }

    50% {
        filter: drop-shadow(0 0 20px var(--color-primary-hover));
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .header {
        top: 3rem;
        right: -20px;
        padding: 12px 28px 12px 16px;
        border-radius: 12px 0 0 12px;
        border: 1px solid var(--premium-border);
        border-right: none;
        animation: none;
        opacity: 1;
        background: rgba(3, 7, 18, 0.9);
        /* Remove properties that create containing block for fixed children */
        backdrop-filter: none;
        transform: none;
        filter: none;
    }

    .nav-menu {
        display: flex !important;
        position: fixed !important;
        top: 100px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: auto !important;
        width: 100% !important;
        max-width: 100vw !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        flex-direction: column;
        background: rgba(3, 7, 18, 0.95);
        backdrop-filter: blur(20px);
        padding: var(--space-32);
        gap: var(--space-16);
        border-bottom: 1px solid var(--premium-border);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
        z-index: 1001;
        /* Hidden state */
        opacity: 0;
        transform: translateY(-20px);
        pointer-events: none;
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-menu.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu .nav-btn {
        display: block;
        width: 100%;
        text-align: left;
        padding: var(--space-12) var(--space-16);
        font-size: var(--font-size-lg);
        color: var(--text-primary);
        background: transparent;
        border: none;
        border-radius: 8px;
        transition: background 0.2s ease;
    }

    .nav-menu .nav-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--space-32);
    }

    .hero-title {
        font-size: calc(var(--font-size-base) * 2.5);
    }

    .hero-visual {
        display: none;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        padding: var(--space-24) var(--space-16);
        width: 100%;
        margin: 0 auto;
        max-width: 100%;
        box-sizing: border-box;
    }

    .contact-info {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: var(--space-32);
    }

    .contact-links {
        align-items: center;
        width: 100%;
    }

    .contact-link {
        width: 100%;
        justify-content: center;
    }

    .section-title {
        font-size: var(--font-size-3xl);
        margin-right: 0;
        /* Center title on tablet as well */
        margin-bottom: var(--space-32);
    }

    /* .header-container {
        padding: var(--space-16) var(--space-24);
    } */

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .scroll-indicator {
        display: none;
    }

    .section {
        padding: calc(var(--space-32) * 2) var(--space-16) var(--space-32);
        align-items: center;
    }

    .skills-matrix {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on tablet */
        gap: var(--space-16);
    }
}

@media (max-width: 480px) {
    /* .header-container {
        padding: var(--space-12) var(--space-16);
    } */

    .logo {
        font-size: var(--font-size-xl);
    }

    .section {
        padding: calc(var(--space-32) * 2) var(--space-16) var(--space-16);
    }

    .section-title {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--space-32);
        margin-right: 0;
        /* No offset on mobile */
    }

    .hero {
        padding: calc(var(--space-32) * 2) var(--space-16) var(--space-16);
    }

    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-lg);
    }

    .hero-description {
        font-size: var(--font-size-md);
    }

    .hero-visual {
        height: 250px;
    }

    .floating-card {
        width: 100px;
        height: 100px;
    }

    .card-icon {
        font-size: var(--font-size-3xl);
    }

    .floating-card p {
        font-size: var(--font-size-xs);
    }

    .hero-cta {
        gap: var(--space-16);
    }

    .btn {
        padding: var(--space-10) var(--space-24);
        font-size: var(--font-size-sm);
    }

    .about-text p {
        font-size: var(--font-size-base);
    }

    .skill-card {
        padding: var(--space-16);
    }

    .stat-item {
        padding: var(--space-24);
    }

    .stat-number {
        font-size: var(--font-size-3xl);
    }

    .projects-grid,
    .blog-grid,
    .skills-matrix {
        grid-template-columns: 1fr !important;
        gap: var(--space-24);
    }

    .project-info,
    .blog-card {
        padding: var(--space-20);
    }

    .timeline-item {
        gap: var(--space-16);
    }

    .timeline-content h4 {
        font-size: var(--font-size-base);
    }

    .contact-form input,
    .contact-form textarea {
        padding: var(--space-12);
        font-size: var(--font-size-sm);
    }

    .footer {
        padding: var(--space-24) var(--space-16);
    }

    .footer-links {
        flex-direction: row;
        gap: var(--space-16);
        justify-content: center;
    }
}

/* ==================== Mobile Hero Layout Enhancements ==================== */
@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: var(--space-48);
        text-align: center;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--space-32);
    }

    .hero-text {
        text-align: center;
        order: 1;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
        line-height: 1.1;
        margin-bottom: var(--space-16);
    }

    .hero-subtitle {
        font-size: var(--font-size-lg);
        margin-bottom: var(--space-12);
    }

    .hero-description {
        font-size: var(--font-size-base);
        max-width: 100%;
        margin-bottom: var(--space-24);
    }

    .hero-visual {
        order: 2;
        width: 100%;
        max-width: 320px;
        height: auto;
        aspect-ratio: 4/3;
    }

    .hero-slider {
        border-radius: var(--radius-lg);
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        gap: var(--space-12);
    }

    .hero-cta .btn {
        width: 100%;
        padding: var(--space-16) var(--space-24);
        font-size: var(--font-size-sm);
        justify-content: center;
    }

    /* About Section Mobile */
    .about-content {
        text-align: center;
    }

    .about-image {
        margin: 0 auto var(--space-24);
    }

    .about-text p {
        text-align: center;
    }

    /* Stats Grid Mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-16);
    }

    .stat-item {
        padding: var(--space-20);
    }

    .stat-number {
        font-size: var(--font-size-2xl);
    }

    .stat-label {
        font-size: var(--font-size-xs);
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 80px;
        padding-left: var(--space-16);
        padding-right: var(--space-16);
    }

    .hero-title {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
    }

    .hero-visual {
        max-width: 280px;
    }

    .hero-cta {
        max-width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}


/* ==================== About & Stats ==================== */
.stat-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--premium-border);
    padding: var(--space-48);
    border-radius: var(--radius-base);
    text-align: center;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
    background: rgba(56, 189, 248, 0.05);
}

.stat-number {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin-bottom: var(--space-8);
    min-width: 80px;
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* ==================== Resume Timeline ==================== */
.timeline-item {
    position: relative;
    padding-left: var(--space-48);
    margin-bottom: var(--space-64);
    border-left: 1px solid var(--premium-border);
}

.timeline-marker {
    position: absolute;
    left: -5px;
    top: 0;
    width: 9px;
    height: 9px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--color-primary);
}

.timeline-meta {
    font-family: var(--font-family-mono);
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-12);
    letter-spacing: 1px;
}

/* ==================== Contact Section ==================== */
/* Merged with primary definition above */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-24);
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--premium-border);
    padding: var(--space-12);
    /* Reduced from 16 */
    border-radius: var(--radius-base);
    color: var(--color-text);
    font-family: var(--font-family-base);
    transition: var(--transition);
}

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

/* ==================== Footer ==================== */
.footer {
    padding: var(--space-24) 0;
    /* Shrank from 64px */
    text-align: center;
    border-top: 1px solid var(--premium-border);
    margin-top: 60px;
    /* Shrank from 120px */
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-32);
    margin-top: var(--space-24);
}

.footer-links a {
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 2px;
}


/* ==================== Article & Project Detail Styles ==================== */
.blog-header {
    margin-bottom: var(--space-32);
    text-align: center;
}

.back-link {
    display: inline-block;
    margin-bottom: var(--space-24);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;
}

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

.article-title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    margin-bottom: var(--space-16);
    line-height: var(--line-height-tight);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: var(--space-24);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    color: var(--color-text);
}

.article-content h2 {
    font-size: var(--font-size-2xl);
    color: var(--color-primary);
    margin-top: var(--space-32);
    margin-bottom: var(--space-16);
    font-weight: var(--font-weight-bold);
}

.article-content h3 {
    font-size: var(--font-size-xl);
    color: var(--color-text);
    margin-top: var(--space-24);
    margin-bottom: var(--space-12);
    font-weight: var(--font-weight-semibold);
}

.article-content p {
    margin-bottom: var(--space-16);
}

.article-content ul,
.article-content ol {
    margin-bottom: var(--space-16);
    padding-left: var(--space-24);
}

.article-content li {
    margin-bottom: var(--space-8);
}

.article-content pre {
    background: var(--color-surface);
    padding: var(--space-16);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: var(--space-24);
    border: 1px solid var(--color-border);
}

.article-content code {
    font-family: var(--font-family-mono);
    font-size: var(--font-size-sm);
}

/* ==================== Project Specific Styles ==================== */
.project-image-placeholder {
    width: 100%;
    height: 160px;
    background: var(--color-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-16);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-8);
    margin-bottom: var(--space-16);
}

.project-tags span {
    background: var(--color-bg-1);
    color: var(--color-primary);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
}

/* ==================== 404 Error Page Styles ==================== */
.error-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
}

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-24);
}

.error-code {
    font-size: 120px;
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    line-height: 1;
    font-family: var(--font-family-mono);
    text-shadow: 0 0 20px rgba(var(--color-teal-500-rgb), 0.3);
}

.error-message {
    font-family: var(--font-family-mono);
    font-size: var(--font-size-xl);
    color: var(--color-error);
    background: rgba(var(--color-error-rgb), 0.1);
    padding: var(--space-16) var(--space-24);
    border-radius: var(--radius-md);
    border: 1px solid rgba(var(--color-error-rgb), 0.2);
    display: inline-block;
}

.prompt {
    color: var(--color-text-secondary);
    margin-right: var(--space-8);
}

.error-description {
    color: var(--color-text-secondary);
    font-size: var(--font-size-lg);
    max-width: 400px;
    margin-bottom: var(--space-16);
}

/* ==================== 404 Page Styling ==================== */
.error-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Use transparent background to show ambient-bg if present, or fallback to theme bg */
    background: transparent;
    position: relative;
    overflow: hidden;
    padding: var(--space-48) var(--space-16);
    box-sizing: border-box;
}

.error-section::before {
    content: '';
    position: absolute;
    width: 200vw;
    height: 200vw;
    background: repeating-linear-gradient(transparent 0, transparent 48px,
            rgba(56, 189, 248, 0.03) 50px);
    animation: scanline 20s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes scanline {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50px);
    }
}

.error-container {
    text-align: center;
    z-index: 2;
    max-width: 600px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    padding: var(--space-64) var(--space-32);
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(56, 189, 248, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: scale(0.8);
}

/* Glowing border effect */
.error-container::after {
    content: '';
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), transparent 40%, transparent 60%, rgba(56, 189, 248, 0.2));
}

.error-code {
    font-family: 'Space Mono', monospace;
    font-size: 8rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, #f8fafc 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-24);
    opacity: 0.9;
    text-shadow: 0 0 40px rgba(56, 189, 248, 0.2);
    position: relative;
}

.error-message {
    font-family: 'Space Mono', monospace;
    color: var(--color-primary);
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-24);
    padding: var(--space-12) var(--space-24);
    background: rgba(56, 189, 248, 0.05);
    border-radius: var(--radius-base);
    display: inline-block;
}

.prompt {
    color: var(--color-text-secondary);
    margin-right: var(--space-8);
}

.typing-text {
    border-right: 2px solid var(--color-primary);
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        border-color: transparent
    }

    50% {
        border-color: var(--color-primary)
    }
}

.error-description {
    color: var(--color-text-secondary);
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-48);
    line-height: 1.6;
}

/* Profile Image with Text Wrap */
.profile-container {
    float: left;
    margin-right: 20px;
    margin-bottom: 8px;
    width: 120px;
    height: 120px;
    shape-outside: circle(50%);
    border-radius: 50%;
    position: relative;
    border: 3px solid var(--color-primary);
    overflow: hidden;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
    background: var(--color-surface);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .profile-container {
        float: left;
        margin-right: 16px;
        margin-bottom: 12px;
        width: 90px;
        height: 90px;
        shape-outside: circle(50%);
    }

    .about-text {
        text-align: left;
    }

    .about-text p {
        text-align: left;
        line-height: 1.6;
        font-size: var(--font-size-sm);
    }

    /* Stats 2x2 grid with left-aligned content */
    .about-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-12);
        width: 100%;
        margin-top: var(--space-24);
    }

    .stat-item {
        text-align: left;
        padding: var(--space-12) var(--space-16);
        min-width: unset;
    }

    .stat-number {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: var(--font-size-xs);
        white-space: normal;
    }

    /* Resume cards - left align all content on mobile */
    .resume-card-body,
    .resume-skills .resume-card-body,
    .resume-cert .resume-card-body {
        text-align: left;
    }

    .resume-skills .resume-card-header,
    .resume-cert .resume-card-header {
        justify-content: flex-start;
    }

    .skills-tags {
        justify-content: flex-start;
    }

    .highlight-list {
        align-items: flex-start;
    }
}