/* ============================================
   KERN TEOH - PROFESSIONAL PORTFOLIO
   Modern, Elegant, Data & AI Focused
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #22d3ee;

    /* Neutrals */
    --dark: #0f172a;
    --dark-light: #1e293b;
    --dark-lighter: #334155;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f1f5f9;
    --white: #ffffff;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-dark: linear-gradient(180deg, var(--dark) 0%, var(--dark-light) 100%);
    --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(14, 165, 233, 0.2) 100%);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --section-padding: 100px;
    --container-width: 1200px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --radius-full: 50%;
}

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

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

body {
    font-family: var(--font-primary);
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.loading {
    overflow: hidden;
}

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

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

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ============================================
   LOADER
   ============================================ */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--dark-lighter);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--gray-light);
    letter-spacing: 2px;
    text-transform: uppercase;
}

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

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.cursor, .cursor-follower {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body:hover .cursor,
body:hover .cursor-follower {
    opacity: 1;
}

.cursor {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out, width 0.2s ease, height 0.2s ease;
}

.cursor-follower.active {
    width: 60px;
    height: 60px;
    border-color: var(--accent);
}

@media (max-width: 768px) {
    .cursor, .cursor-follower {
        display: none;
    }
}

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

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    padding: 15px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-light);
    position: relative;
    padding: 8px 0;
    transition: color var(--transition-fast);
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--white);
    transition: all var(--transition-normal);
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--dark-light);
        flex-direction: column;
        justify-content: center;
        gap: 30px;
        transition: right var(--transition-normal);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 100px 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-gradient {
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    animation: gradientFloat 15s ease-in-out infinite;
}

@keyframes gradientFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-5%, 5%) rotate(5deg); }
}

.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-text {
    z-index: 1;
}

.hero-greeting {
    font-size: 18px;
    color: var(--primary-light);
    font-weight: 500;
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.2s;
}

.hero-name {
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.4s;
}

.hero-title {
    font-size: 24px;
    font-weight: 600;
    color: #818cf8;
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.6s;
}

.hero-description {
    font-size: 18px;
    color: var(--gray-light);
    max-width: 500px;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.8s;
}

.hero-cta {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 1s;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

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

.btn-primary i {
    transition: transform var(--transition-normal);
}

.btn-primary:hover i {
    transform: translateX(5px);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--dark-lighter);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 50px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 1.2s;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 42px;
    font-weight: 700;
    color: var(--white);
    display: inline;
}

.stat-plus {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 14px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero Image */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.5s;
}

.image-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
}

.image-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

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

.image-border {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 340px;
    height: 340px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

.image-border::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.profile-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--dark-light);
    box-shadow: var(--shadow-lg);
    filter: brightness(2.0);
}

/* Floating Badges */
.floating-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    background: rgba(30, 41, 59, 0.95);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(10px);
    animation: float 6s ease-in-out infinite;
    z-index: 10;
}

.floating-badge i {
    font-size: 20px;
    color: var(--primary-light);
    filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.5));
}

.floating-badge span {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.badge-1 {
    top: 5%;
    right: -10px;
    animation-delay: 0s;
}

.badge-2 {
    top: 40%;
    left: -30px;
    animation-delay: 1.5s;
}

.badge-3 {
    bottom: 5%;
    right: 0;
    animation-delay: 3s;
}

.badge-4 {
    bottom: 25%;
    left: -20px;
    animation-delay: 4.5s;
}

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

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--gray);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 1.5s;
    opacity: 0;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--primary), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    50.1% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

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

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

/* ============================================
   SECTIONS COMMON
   ============================================ */
.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
}

.section-line {
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 0 auto;
    border-radius: 2px;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
    background: var(--dark-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    color: var(--gray-light);
    margin-bottom: 20px;
}

.about-intro {
    font-size: 20px;
    line-height: 1.8;
}

.about-intro strong {
    color: var(--white);
}

.about-text p strong {
    color: var(--primary-light);
}

.about-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 30px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--light);
}

.highlight-item i {
    color: var(--primary);
    font-size: 18px;
}

.about-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: var(--dark);
    border: 1px solid var(--dark-lighter);
    border-radius: var(--radius-md);
    padding: 28px;
    display: flex;
    align-items: start;
    gap: 20px;
    transition: all var(--transition-normal);
}

.info-card:hover {
    border-color: var(--primary);
    transform: translateX(10px);
}

.info-card .card-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-card .card-icon i {
    font-size: 20px;
    color: var(--white);
}

.info-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 8px;
}

.info-card p {
    font-size: 14px;
    color: var(--gray-light);
    margin: 0;
}

/* ============================================
   EXPERTISE SECTION
   ============================================ */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.expertise-card {
    background: var(--dark-light);
    border: 1px solid var(--dark-lighter);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.expertise-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.expertise-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.expertise-card:hover::before {
    transform: scaleX(1);
}

.expertise-card.featured {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
    border-color: rgba(99, 102, 241, 0.3);
}

.expertise-card.featured::before {
    transform: scaleX(1);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.expertise-card .card-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.expertise-card .card-icon i {
    font-size: 26px;
    color: var(--white);
}

.card-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.expertise-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 12px;
}

.expertise-card > p {
    color: var(--gray-light);
    font-size: 15px;
    margin-bottom: 20px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-light);
    background: var(--dark);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--dark-lighter);
    transition: all var(--transition-fast);
}

.tag:hover {
    border-color: var(--primary);
    color: var(--primary-light);
}

.tools {
    font-size: 13px;
    color: var(--gray);
}

.tool-label {
    color: var(--gray-light);
    font-weight: 600;
    margin-right: 8px;
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */
.portfolio {
    background: #1e293b;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
}

.portfolio-card {
    background: var(--dark-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--dark-lighter);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.portfolio-card .card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.portfolio-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.5s ease;
}

.portfolio-card:hover .card-image img {
    transform: scale(1.08);
}

.portfolio-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-card:hover .card-overlay {
    opacity: 1;
}

.overlay-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #0ea5e9 100%);
    color: #ffffff;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.overlay-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.overlay-btn.disabled {
    background: #334155;
    cursor: default;
}

.overlay-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

.status-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: 8px;
    z-index: 2;
}

.status-badge.live {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge.internal {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.status-badge.coming-soon {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.portfolio-card .card-body {
    padding: 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--dark-light);
}

.portfolio-card .card-body .card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 12px;
}

.portfolio-card .card-body p {
    color: var(--gray-light);
    font-size: 15px;
    margin-bottom: 20px;
    flex: 1;
}

.portfolio-card .card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.portfolio-card .card-tech span {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-light);
    background: var(--dark);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--dark-lighter);
    transition: all var(--transition-fast);
}

.portfolio-card .card-tech span:hover {
    border-color: var(--primary);
    color: var(--primary-light);
}

/* ============================================
   CERTIFICATIONS SECTION
   ============================================ */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cert-card {
    background: var(--dark-light);
    border: 1px solid var(--dark-lighter);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.cert-card:not(.no-link):hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.cert-card.no-link {
    cursor: default;
}

.cert-logo {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cert-logo i {
    font-size: 22px;
    color: var(--white);
}

.cert-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
    line-height: 1.4;
}

.cert-info p {
    font-size: 12px;
    color: var(--gray);
}

.cert-link {
    position: absolute;
    right: 20px;
    color: var(--gray);
    font-size: 14px;
    opacity: 0;
    transition: all var(--transition-fast);
}

.cert-card:hover .cert-link {
    opacity: 1;
    color: var(--primary);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
    background: var(--dark-light);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact-text p {
    font-size: 18px;
    color: var(--gray-light);
    margin-bottom: 30px;
    line-height: 1.8;
}

.contact-info {
    display: flex;
    gap: 40px;
}

.contact-info .info-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-info .info-item i {
    font-size: 18px;
    color: var(--primary);
}

.contact-info .info-item span {
    font-size: 15px;
    color: var(--light);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    background: var(--dark);
    border: 1px solid var(--dark-lighter);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.social-card:hover {
    transform: translateX(10px);
    border-color: var(--primary);
}

.social-card > i:first-child {
    font-size: 28px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.social-card.linkedin > i:first-child {
    background: rgba(0, 119, 181, 0.2);
    color: #0077b5;
}

.social-card.facebook > i:first-child {
    background: rgba(24, 119, 242, 0.2);
    color: #1877f2;
}

.social-info {
    flex: 1;
}

.social-name {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
}

.social-handle {
    font-size: 14px;
    color: var(--gray);
}

.social-card > i:last-child {
    color: var(--gray);
    transition: all var(--transition-fast);
}

.social-card:hover > i:last-child {
    color: var(--primary);
    transform: translateX(5px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--dark);
    padding: 60px 0 30px;
    border-top: 1px solid var(--dark-lighter);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--dark-lighter);
    margin-bottom: 30px;
}

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

.footer-brand .logo-text {
    font-size: 36px;
}

.footer-brand p {
    font-size: 14px;
    color: var(--gray);
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    font-size: 14px;
    color: var(--gray-light);
    transition: color var(--transition-fast);
}

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

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

.footer-social a {
    width: 44px;
    height: 44px;
    background: var(--dark-light);
    border: 1px solid var(--dark-lighter);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-light);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: var(--gray);
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: 999;
    box-shadow: var(--shadow-md);
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1200px) {
    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

@media (max-width: 992px) {
    :root {
        --section-padding: 80px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 60px;
    }

    .hero-text {
        order: 1;
    }

    .hero-image {
        order: 0;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

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

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

    .image-wrapper {
        width: 300px;
        height: 300px;
    }

    .image-border {
        width: 260px;
        height: 260px;
    }

    .profile-image {
        width: 220px;
        height: 220px;
    }

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

    .about-cards {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .info-card {
        flex: 1 1 calc(50% - 10px);
        min-width: 280px;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    .hero {
        padding-top: 120px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .stat-item {
        text-align: center;
    }

    .floating-badge {
        display: none;
    }

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

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

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

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

    .info-card {
        flex: 1 1 100%;
    }

    .contact-info {
        flex-direction: column;
        gap: 20px;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title-wrapper {
        flex-direction: column;
        gap: 4px;
    }

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

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

    .image-wrapper {
        width: 250px;
        height: 250px;
    }

    .image-border {
        width: 220px;
        height: 220px;
    }

    .profile-image {
        width: 180px;
        height: 180px;
    }
}

/* ============================================
   ANIMATIONS - INTERSECTION OBSERVER
   ============================================ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grid items */
.expertise-card:nth-child(1) { transition-delay: 0.1s; }
.expertise-card:nth-child(2) { transition-delay: 0.2s; }
.expertise-card:nth-child(3) { transition-delay: 0.3s; }
.expertise-card:nth-child(4) { transition-delay: 0.4s; }
.expertise-card:nth-child(5) { transition-delay: 0.5s; }
.expertise-card:nth-child(6) { transition-delay: 0.6s; }

.portfolio-card:nth-child(1) { transition-delay: 0.1s; }
.portfolio-card:nth-child(2) { transition-delay: 0.2s; }
.portfolio-card:nth-child(3) { transition-delay: 0.3s; }
.portfolio-card:nth-child(4) { transition-delay: 0.4s; }
.portfolio-card:nth-child(5) { transition-delay: 0.5s; }
.portfolio-card:nth-child(6) { transition-delay: 0.6s; }

.cert-card:nth-child(1) { transition-delay: 0.05s; }
.cert-card:nth-child(2) { transition-delay: 0.1s; }
.cert-card:nth-child(3) { transition-delay: 0.15s; }
.cert-card:nth-child(4) { transition-delay: 0.2s; }
.cert-card:nth-child(5) { transition-delay: 0.25s; }
.cert-card:nth-child(6) { transition-delay: 0.3s; }
.cert-card:nth-child(7) { transition-delay: 0.35s; }
.cert-card:nth-child(8) { transition-delay: 0.4s; }
