/* ================================
   DESIGN SYSTEM & CSS VARIABLES
   ================================ */

:root {
    --bg-dark: #0b0f1f;
    --bg-light: #ffffff;
    --surface-dark: #111827;
    --surface-light: #f8fafc;
    --text-dark: #e8ecf4;
    --text-light: #1f2937;
    --text-muted-dark: #9aa3b2;
    --text-muted-light: #64748b;
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --accent: #10b981;
    --accent-dark: #059669;
    --danger: #ef4444;
    --border-dark: #1f2937;
    --border-light: #e2e8f0;

    --bg: var(--bg-dark);
    --surface: var(--surface-dark);
    --text: var(--text-dark);
    --text-muted: var(--text-muted-dark);
    --border: var(--border-dark);

    --font-sans: 'Poppins', system-ui, -apple-system, sans-serif;
    --font-mono: 'Fira Code', monospace;
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --z-sticky: 1020;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.25);
    --shadow-lg: 0 25px 60px rgba(0,0,0,0.35);
    --shadow-glow: 0 20px 70px rgba(99, 102, 241, 0.25);
    --radius-sm: 0.75rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
}

/* Light Mode Theme */
body.light-mode {
    --bg: var(--bg-light);
    --surface: var(--surface-light);
    --text: var(--text-light);
    --text-muted: var(--text-muted-light);
    --border: var(--border-light);
}

/* ================================
   RESET & BASE STYLES
   ================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    transition: background-color var(--transition-base), color var(--transition-base);
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 999px;
    border: 3px solid var(--surface);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ================================
   PAGE LOADER
   ================================ */

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-spinner {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.loader-spinner span {
    display: block;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    animation: loaderBounce 0.6s ease-in-out infinite alternate;
}

.loader-spinner span:nth-child(2) { animation-delay: 0.15s; }
.loader-spinner span:nth-child(3) { animation-delay: 0.3s; }
.loader-spinner span:nth-child(4) { animation-delay: 0.45s; }

@keyframes loaderBounce {
    from { transform: translateY(0); opacity: 0.4; }
    to { transform: translateY(-16px); opacity: 1; }
}

.loader-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* ================================
   SCROLL PROGRESS BAR
   ================================ */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 9998;
    transition: width 0.1s linear;
    border-radius: 0 2px 0 0;
}

/* ================================
   BACK TO TOP BUTTON
   ================================ */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

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

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.6);
}

.back-to-top:active {
    transform: scale(0.95);
}

/* ================================
   TYPOGRAPHY
   ================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.section-header {
    margin-bottom: 3rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 999px;
}

p {
    line-height: 1.7;
    margin-bottom: 1rem;
}

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

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

code {
    font-family: var(--font-mono);
    background: var(--surface);
    padding: 0.125rem 0.375rem;
    border-radius: 0.5rem;
    font-size: 0.9em;
}

/* ================================
   UTILITIES
   ================================ */

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

.container.narrow {
    width: min(800px, 92%);
}

.section {
    padding: 6rem 0;
}

.section.alt {
    background: var(--surface);
    transition: background-color var(--transition-base);
}

.eyebrow {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 1rem;
}

.error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    min-height: 1.25rem;
}

/* ================================
   BUTTONS
   ================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.btn:hover::before {
    left: 100%;
}

/* Primary Button */
.btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn.primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 30px 80px rgba(99, 102, 241, 0.45);
}

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

/* Secondary Button */
.btn:not(.primary):not(.small) {
    border-color: var(--border);
    background: var(--surface);
    color: var(--text);
}

.btn:not(.primary):not(.small):hover {
    border-color: var(--primary);
    background: var(--bg);
    color: var(--primary);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.18);
    transform: translateY(-2px);
}

/* Small Button */
.btn.small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
}

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

/* ================================
   HEADER & NAVIGATION
   ================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: all var(--transition-base);
}

.site-header.scrolled {
    background: rgba(11, 15, 31, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

body.light-mode .site-header {
    background: rgba(255, 255, 255, 0.8);
}

body.light-mode .site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 4%;
}

.brand {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    transition: all var(--transition-base);
    letter-spacing: -0.03em;
}

.brand:hover {
    transform: scale(1.08);
    color: var(--primary-light);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 2.2rem;
}

.site-nav a {
    color: var(--text-muted);
    font-weight: 500;
    transition: all var(--transition-base);
    position: relative;
    font-size: 0.95rem;
}

.site-nav a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-base);
    border-radius: 999px;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--primary);
}

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

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.nav-toggle:hover {
    background: var(--surface);
    border-color: var(--primary);
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: rotate(30deg);
}

.icon-sun { display: none; }
.icon-moon { display: block; }

body.light-mode .icon-sun { display: block; }
body.light-mode .icon-moon { display: none; }

/* ================================
   HERO SECTION
   ================================ */

.hero {
    padding-top: 8rem;
    padding-bottom: 6rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(16, 185, 129, 0.06));
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.4;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    animation: slideInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.title {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 1.2rem 0;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-weight: 500;
    align-items: baseline;
    line-height: 1.4;
}

.subtitle .reveal {
    opacity: 0;
    animation: revealBlink 0.6s ease forwards;
    display: inline-block;
}

.subtitle .reveal:nth-child(1) { animation-delay: 0.2s; }
.subtitle .reveal:nth-child(2) { animation-delay: 0.6s; }
.subtitle .reveal:nth-child(3) { animation-delay: 1.0s; }
.subtitle .reveal:nth-child(4) { animation-delay: 1.4s; }

@keyframes revealBlink {
    0% { opacity: 0; transform: translateY(8px); }
    40% { opacity: 1; transform: translateY(0); }
    60% { opacity: 1; }
    100% { opacity: 1; }
}

.tagline {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 55ch;
    margin-bottom: 2.5rem;
    line-height: 1.7;
    min-height: 1.7em;
}

.tagline .typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--primary);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: cursorBlink 0.7s step-end infinite;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Availability Badge */
.hero-badges {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 600;
    width: fit-content;
}

.pulse-dot {
    display: block;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulseDot 1.8s ease-in-out infinite;
    opacity: 0;
}

@keyframes pulseDot {
    0% { transform: scale(0.8); opacity: 0.7; }
    100% { transform: scale(2.2); opacity: 0; }
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-photo {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: slideInRight 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.avatar-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.avatar-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25), rgba(16, 185, 129, 0.15), transparent 70%);
    filter: blur(20px);
    z-index: 0;
    animation: pulseGlow 4s ease-in-out infinite;
}

.avatar-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 6px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: spin 8s linear infinite;
    z-index: 2;
}

.avatar-ring.delay {
    animation-direction: reverse;
    animation-duration: 12s;
    inset: -14px;
    opacity: 0.6;
    padding: 4px;
}

.avatar-img {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    z-index: 3;
    box-shadow: 0 30px 70px rgba(99, 102, 241, 0.35), 0 10px 30px rgba(0, 0, 0, 0.45);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
    max-width: 100%;
    aspect-ratio: 1 / 1;
}

.avatar-wrapper:hover .avatar-img {
    transform: scale(1.04) translateY(-6px);
    box-shadow: 0 40px 90px rgba(99, 102, 241, 0.5), 0 15px 40px rgba(0, 0, 0, 0.6);
}

.particles {
    position: absolute;
    inset: -40px;
    width: 400px;
    height: 400px;
    z-index: 1;
    pointer-events: none;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.75;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

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

/* Hover tilt handled by JS class */
.avatar-wrapper.tilt-active .avatar-img {
    transition: transform 0.1s ease;
}

/* ================================
   ABOUT SECTION
   ================================ */

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.about-grid > div {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.about-grid > div:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.about-grid h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

/* ================================
   SKILLS SECTION
   ================================ */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    transition: all var(--transition-base);
    cursor: default;
    box-shadow: var(--shadow-sm);
}

.skill-card i {
    font-size: 3rem;
}

.skill-card span {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

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

/* ================================
   PROJECTS SECTION
   ================================ */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-filters {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 999px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-sans);
}

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

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    transition: all var(--transition-base);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(16, 185, 129, 0.08));
    transition: top var(--transition-base);
    z-index: 1;
}

.card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.card:hover::before {
    top: 0;
}

.card-body {
    padding: 2rem;
    flex: 1;
    position: relative;
    z-index: 2;
}

.card-title {
    color: var(--text);
    margin-bottom: 1rem;
}

.card-text {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-tools {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
}

.card-actions {
    display: flex;
    gap: 1rem;
    padding: 0 2rem 2rem;
    position: relative;
    z-index: 2;
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}

/* Card filter animation */
.card.hidden-card {
    display: none;
}

.card.show-card {
    animation: cardFadeIn 0.4s ease forwards;
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================================
   EXPERIENCE TIMELINE
   ================================ */

.timeline {
    position: relative;
    margin-top: 3rem;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

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

.timeline-marker {
    position: absolute;
    left: -2.05rem;
    top: 0.5rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 3px var(--primary), 0 0 12px rgba(99, 102, 241, 0.4);
    z-index: 2;
}

.timeline-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.75rem 2rem;
    transition: all var(--transition-base);
}

.timeline-content:hover {
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.12);
}

.timeline-date {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
    letter-spacing: 0.04em;
}

.timeline-content h3 {
    margin-bottom: 0.25rem;
}

.timeline-org {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 0.75rem;
}

/* ================================
   CERTIFICATIONS SECTION
   ================================ */

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.cert-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

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

.cert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.cert-card h3 {
    margin-bottom: 0;
    font-size: 1.1rem;
}

.cert-issuer {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.cert-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ================================
   FORM STYLES
   ================================ */

.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
}

.form-field {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.875rem;
    transition: color var(--transition-base);
}

input,
textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all var(--transition-base);
    outline: none;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: var(--surface);
}

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

.contact-details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
}

.contact-details h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.contact-details ul {
    list-style: none;
}

.contact-details li {
    margin-bottom: 2rem;
}

.contact-details a {
    color: var(--primary);
    font-weight: 500;
    transition: all var(--transition-base);
}

.contact-details a:hover {
    transform: translateX(4px);
}

/* ================================
   FOOTER
   ================================ */

.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 3.5rem 0;
    text-align: center;
    color: var(--text-muted);
    margin-top: auto;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.site-footer .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.site-footer .footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
}

.site-footer .footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-base);
}

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

/* ================================
   ANIMATIONS & KEYFRAMES
   ================================ */

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-photo {
        order: -1;
    }

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

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

    .timeline {
        padding-left: 1.5rem;
    }

    .avatar-wrapper {
        width: 290px;
        height: 290px;
    }

    .particles {
        width: 350px;
        height: 350px;
        inset: -35px;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 1rem 2%;
    }

    .site-nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 1.5rem;
        gap: 1rem;
    }

    .site-nav ul.open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .btn {
        width: 100%;
    }

    .hero-photo img {
        width: 200px;
        height: 200px;
    }

    .avatar-img {
        width: 200px;
        height: 200px;
    }

    .avatar-wrapper {
        width: 240px;
        height: 240px;
    }

    .particles {
        width: 280px;
        height: 280px;
        inset: -30px;
    }

    .section {
        padding: 3rem 0;
    }

    .back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .card-actions {
        flex-direction: column;
    }

    .site-nav ul {
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1000;
    }

    .hero-photo img {
        width: 180px;
        height: 180px;
    }

    .avatar-img {
        width: 180px;
        height: 180px;
    }

    .avatar-wrapper {
        width: 210px;
        height: 210px;
    }

    .particles {
        width: 250px;
        height: 250px;
        inset: -25px;
    }

    .contact-form,
    .contact-details {
        padding: 1.5rem;
    }

    .section {
        padding: 2rem 0;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .timeline-content {
        padding: 1.25rem;
    }

    .cert-card {
        padding: 1.5rem;
    }
}

/* ================================
   ACCESSIBILITY
   ================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible,
.filter-btn:focus-visible,
.theme-toggle:focus-visible,
.back-to-top:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ================================
   MOBILE BOTTOM NAVIGATION
   ================================ */

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(11, 15, 31, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 0.5rem 0;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    transition: all var(--transition-base);
    position: relative;
    min-height: 56px;
}

.mobile-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-base);
    border-radius: 999px;
}

.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-item.active::before {
    width: 40px;
}

.mobile-nav-item:active {
    transform: scale(0.95);
}

/* ================================
   SAFE AREA SUPPORT
   ================================ */

body {
    padding-bottom: env(safe-area-inset-bottom);
}

.site-header {
    padding-top: env(safe-area-inset-top);
}

/* ================================
   TOUCH TARGETS
   ================================ */

@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
    }

    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }

    .btn {
        min-height: 48px;
        padding: 0.9rem 1.25rem;
    }

    .filter-btn {
        min-height: 44px;
        padding: 0.6rem 1.25rem;
    }

    .theme-toggle {
        min-width: 48px;
        min-height: 48px;
    }

    .back-to-top {
        min-width: 48px;
        min-height: 48px;
    }

    .nav-toggle {
        min-width: 48px;
        min-height: 48px;
    }

    .card {
        cursor: pointer;
    }

    .skill-card {
        cursor: pointer;
        min-height: 120px;
    }

    input,
    textarea {
        min-height: 48px;
        font-size: 16px;
    }

    .site-nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* ================================
   MOBILE TYPOGRAPHY
   ================================ */

@media (max-width: 768px) {
    .title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    .subtitle {
        font-size: 1rem;
    }

    .tagline {
        font-size: 0.95rem;
        max-width: 100%;
    }

    h2 {
        font-size: clamp(1.4rem, 5vw, 2rem);
    }

    h3 {
        font-size: 1.05rem;
    }

    p {
        font-size: 0.95rem;
    }

    .section {
        padding: 4rem 0;
    }

    .hero {
        padding-top: 6rem;
        padding-bottom: 5rem;
    }
}

/* ================================
   LAZY LOADING
   ================================ */

.card-image {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.card-image.loaded {
    opacity: 1;
}

/* ================================
   PWA INSTALL PROMPT
   ================================ */

.pwa-install-prompt {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 999;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    max-width: calc(100% - 2rem);
}

.pwa-install-prompt.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.pwa-install-prompt button {
    flex-shrink: 0;
}

/* ================================
   SWIPE INDICATOR
   ================================ */

.swipe-hint {
    display: none;
    position: fixed;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    opacity: 0;
    pointer-events: none;
    z-index: 998;
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    .swipe-hint {
        display: block;
    }
}
