:root {
    --navy: #0a1628;
    --navy-light: #102040;
    --navy-mid: #1a3058;
    --gold: #c9a227;
    --gold-hero-2: #c9a227;
    --gold-light: #e8c547;
    --gold-light-hero-1: #e8c547;
    --gold-dim: #8a6e1a;
    --text-color-1: #aabbcc;
    --cream: #f5efe0;
    --cream-2: #f5efe0;
    --text-muted: #8899aa;
    --card-bg: #0f1e35;
    --card-border: rgba(201, 162, 39, 0.15);

    --navy-rgb: 10, 22, 40;
    --navy-light-rgb: 16, 32, 64;
    --navy-mid-rgb: 26, 48, 88;

    --gold-rgb: 201, 162, 39;
    --gold-light-rgb: 232, 197, 71;
    --gold-dim-rgb: 138, 110, 26;

    --hero-image: 201, 162, 39;
    --cursor-color: rgba(201, 162, 39, 0.6);
}

/* ===== LIGHT MODE ===== */
body.light {
    --navy: #f4f2d8;
    --navy-light: #e8eef8;
    --navy-mid: #d0ddf0;
    --cream: #0a1628;
    --text-muted: #556677;
    /* --card-bg: #ffffff; */
    --card-border: rgba(10, 62, 150, 0.15);

    --gold-hero-2: #0a1628;
    --gold-light-hero-1: #102040;
    --text-color-1: #8a6e1a;

    --hero-image: 10, 22, 40;
    --cursor-color: rgba(10, 22, 40, 0.5);

    --navy-rgb: 244, 242, 216;
    --navy-light-rgb: 232, 238, 248;
    --navy-mid-rgb: 208, 221, 240;

}

body.light nav {
    background: rgba(240, 244, 250, 0.95);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-drag: none;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--navy);
    color: var(--cream);
    overflow-x: hidden;
    cursor: none;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

* {
    cursor: none !important;
}

/* ===== CUSTOM CURSOR ===== */
.cursor-glow {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--cursor-color) 0%, transparent 70%);
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, opacity 0.2s;
    mix-blend-mode: screen;
}

.cursor-glow.light {
    mix-blend-mode: luminosity;
}

body:hover .cursor-glow {
    opacity: 1;
}

/* ===== LOADER ===== */
.loader {
    position: fixed;
    inset: 0;
    background: var(--navy);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s;
}

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

.loader-inner {
    text-align: center;
    width: 280px;
}

.loader-logo {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--gold);
    margin-bottom: 24px;
    letter-spacing: 2px;
}

.loader-logo span {
    color: var(--cream);
}

.loader-bar {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    margin-bottom: 12px;
    overflow: hidden;
}

.loader-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold-dim), var(--gold));
    border-radius: 2px;
    transition: width 0.1s linear;
}

.loader-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
}

/* ===== CANVAS ===== */
#neural-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

/* ===== NAV ===== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 18px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 22, 40, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--card-border);
    transition: all 0.3s;
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold-hero-2);
    letter-spacing: 0.5px;
}

.nav-logo span {
    color: var(--cream);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.3s;
    position: relative;
    cursor: pointer;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold-hero-2);
    transition: width 0.3s;
}

.nav-links a:hover {
    color: var(--gold-hero-2);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--gold-dim), var(--gold));
    color: var(--navy);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 8px 18px;
    border-radius: 6px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    white-space: nowrap;
}

.nav-cv-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 162, 39, 0.3);
}

.hamburger {
    display: none;
    cursor: pointer;
    color: var(--gold-hero-2);
    font-size: 1.4rem;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 62px;
    left: 0;
    width: 100%;
    background: rgba(var(--navy), 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px 5%;
    z-index: 99;
    border-bottom: 1px solid var(--card-border);
}

.mobile-menu.open {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-menu a {
    color: var(--cream);
    text-decoration: none;
    font-size: 1rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-cv-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--gold-dim), var(--gold)) !important;
    color: var(--navy) !important;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 10px 20px !important;
    border-radius: 6px;
    text-decoration: none;
    border: none !important;
    margin-top: 8px;
    cursor: pointer;
}

/* ===== HERO ===== */
#hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 8% 60px;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(ellipse, rgba(201, 162, 39, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
}

.hero-text {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(201, 162, 39, 0.1);
    border: 1px solid var(--card-border);
    color: var(--gold-hero-2);
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 24px;
    letter-spacing: 1px;
    animation: fadeInUp 0.6s ease both;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--gold-hero-2);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

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

    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}

.hero-name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    color: var(--cream);
    animation: fadeInUp 0.7s ease 0.1s both;
}

.hero-name .gold {
    color: var(--gold);
}

.hero-role {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 12px 0 20px;
    font-family: 'JetBrains Mono', monospace;
    animation: fadeInUp 0.7s ease 0.2s both;
}

.typing-container {
    display: inline-block;
    color: var(--gold-light-hero-1);
    border-right: 2px solid var(--gold);
    padding-right: 4px;
}

.hero-tagline {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-color-1);
    max-width: 500px;
    margin-bottom: 20px;
    animation: fadeInUp 0.7s ease 0.25s both;
}

/* AI Chips */
.hero-ai-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    animation: fadeInUp 0.7s ease 0.3s both;
}

.ai-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(201, 162, 39, 0.07);
    border: 1px solid rgba(201, 162, 39, 0.2);
    color: var(--gold-light-hero-1);
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.ai-chip:hover {
    background: rgba(201, 162, 39, 0.14);
    transform: translateY(-1px);
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeInUp 0.7s ease 0.4s both;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dim));
    color: var(--navy);
    font-weight: 700;
    padding: 14px 32px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201, 162, 39, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--gold-hero-2);
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 6px;
    border: 1px solid var(--card-border);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: rgba(201, 162, 39, 0.08);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 48px;
    animation: fadeInUp 0.7s ease 0.5s both;
    padding-top: 32px;
    border-top: 1px solid var(--card-border);
}

.stat {
    text-align: center;
}

.stat-num {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    display: block;
}

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

/* ===== PROFILE IMAGE ===== */
.hero-image-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 0.8s ease 0.3s both;
}

.profile-ring {
    position: relative;
    width: 380px;
    height: 380px;
}

.ring-outer {
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 2px dashed rgba(var(--hero-image), 0.25);
    animation: spinRing 20s linear infinite;
    z-index: -1;
}

.ring-middle {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 1px solid rgba(var(--hero-image), 0.15);
    animation: spinRing 15s linear infinite reverse;
    z-index: -1;
}

.ring-dots {
    position: absolute;
    inset: -28px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(var(--hero-image), 0.3) 0deg, transparent 30deg, transparent 330deg, rgba(var(--hero-image), 0.3) 360deg);
    animation: spinRing 8s linear infinite;
    z-index: -1;
}

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

.profile-img {
    width: 380px;
    height: 380px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 3px solid var(--gold-dim);
    box-shadow: 0 0 60px rgba(201, 162, 39, 0.2), inset 0 0 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s;
    display: block;
}

.profile-img:hover {
    transform: scale(1.03);
}

.hero-badge-float {
    position: absolute;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    font-size: 0.8rem;
    white-space: nowrap;
}

.badge-icon {
    font-size: 1.2rem;
}

.badge-text-top {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.badge-text-bot {
    font-weight: 600;
    color: var(--cream-2);
}

.float-badge-1 {
    bottom: 30px;
    left: -30px;
    animation: float1 4s ease-in-out infinite;
}

.float-badge-2 {
    top: 30px;
    right: -20px;
    animation: float2 5s ease-in-out infinite;
}

.float-badge-3 {
    top: 50%;
    right: -60px;
    transform: translateY(-50%);
    animation: float1 6s ease-in-out infinite 1s;
}

@keyframes float1 {

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

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

@keyframes float2 {

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

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

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: fadeInUp 1s ease 1s both;
}

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

@keyframes scrollPulse {

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

    50% {
        opacity: 0.4;
        transform: scaleY(0.5);
    }
}

.scroll-indicator span {
    font-size: 0.65rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ===== SECTION STYLES ===== */
section {
    position: relative;
    z-index: 1;
    padding: 70px 8%;
}

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

.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--gold-hero-2);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 12px;
    display: block;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 700;
    color: var(--cream);
}

.section-title .gold {
    color: var(--gold);
}

.section-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
    margin: 16px auto 0;
}

/* ===== ABOUT ===== */
#about {
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-light) 100%);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 70px;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
}

.about-image-side {
    position: relative;
}

.about-img-frame {
    position: relative;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.about-img-frame img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(20%) contrast(1.05);
    border: 2px solid var(--card-border);
    display: block;
}

.about-img-accent {
    position: absolute;
    top: 16px;
    left: 16px;
    right: -16px;
    bottom: -16px;
    border: 2px solid var(--gold-dim);
    border-radius: 12px;
    z-index: -1;
}

.about-text h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--cream);
    margin-bottom: 20px;
}

.about-text p {
    color: #99aabc;
    line-height: 1.8;
    margin-bottom: 16px;
    font-size: 0.95rem;
    text-align: justify;
}

.about-text.gold {
    color: var(--gold-hero-2);
}

.about-text-list {
    list-style: none;
}

.about-text-list-heading {
    font-weight: bold;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.about-tag {
    background: rgba(201, 162, 39, 0.08);
    border: 1px solid var(--card-border);
    color: var(--gold-light-hero-1);
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.2s;
}

.about-tag:hover {
    background: rgba(201, 162, 39, 0.15);
    transform: translateY(-1px);
}

/* ===== SKILLS ===== */
#skills {
    background: none;
}

.skills-container {
    max-width: 1300px;
    margin: 0 auto;
}


.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 28px;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    flex: 1 1 280px;
    max-width: 400px;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.skill-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-dim);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-card-icon {
    font-size: 1.8rem;
    margin-bottom: 14px;
}

.skill-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--cream-2);
    margin-bottom: 18px;
}

.skill-bar-item {
    margin-bottom: 14px;
}

.skill-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.8rem;
    color: #8899aa;
}

.skill-bar-label span:last-child {
    display: none;
    color: var(--gold);
    font-family: 'JetBrains Mono', monospace;
}

.skill-bar-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--gold-dim), var(--gold));
    width: 0;
    transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

.skill-bar-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 8px;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s 1.4s;
}

.skill-card:hover .skill-bar-fill::after {
    opacity: 1;
}

/* ===== PROJECTS ===== */
#projects {
    background: var(--navy);
}

.projects-container {
    max-width: 1400px;
    margin: 0 auto;
}

.project-category {
    margin-bottom: 56px;
}

.category-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--gold-hero-2);
    text-transform: uppercase;
    letter-spacing: 2px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    margin-bottom: 24px;
}

.category-label::before,
.category-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--card-border), transparent);
}

.projects-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

/* ---- Card ---- */
.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.35s ease;
    position: relative;
    cursor: default;
    flex: 0 1 400px;
    min-width: min(400px, 100%);
    max-width: 100%;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    border-color: rgba(201, 162, 39, 0.3);
}

/* Subtle gold shimmer on hover */
.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.04), transparent 60%);
    opacity: 0;
    transition: opacity 0.35s;
    pointer-events: none;
    z-index: 0;
}

.project-card:hover::before {
    opacity: 1;
}

/* Featured gold top border */
.featured-card {
    border-color: rgba(201, 162, 39, 0.28);
}

.project-featured-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: linear-gradient(135deg, var(--gold-dim), var(--gold));
    color: var(--navy);
    font-size: 0.62rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
    z-index: 10;
}

/* ---- Project image ---- */
.project-img-wrap {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    flex-shrink: 0;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.5s ease, filter 0.4s ease;
    filter: brightness(0.85) saturate(0.9);
}

.project-card:hover .project-img {
    transform: scale(1.04);
    filter: brightness(0.95) saturate(1);
}

/* Gradient: very dark at bottom → transparent at top */
.project-img-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(10, 22, 40, 1) 0%,
            rgba(10, 22, 40, 0.75) 35%,
            rgba(10, 22, 40, 0.2) 65%,
            transparent 100%);
    pointer-events: none;
}

/* ---- Project body (text area) ---- */
.project-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 24px 22px;
    position: relative;
    z-index: 1;
}

/* Negative margin pulls body up into the image when image present */
.project-img-wrap+.project-body {
    margin-top: -32px;
}

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.project-icon {
    font-size: 1.5rem;
}

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

.project-link {
    width: 32px;
    height: 48px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--card-border);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    transition: all 0.2s;
    position: relative;
    z-index: 20;
}

.project-link:hover {
    color: var(--gold);
    border-color: var(--gold-dim);
    background: rgba(201, 162, 39, 0.1);
}

.increased-z-index {
    z-index: 1000;
}

.project-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--cream-2);
    margin-bottom: 7px;
    line-height: 1.3;
}

.project-desc {
    font-size: 0.84rem;
    line-height: 1.65;
    color: #8899aa;
    flex: 1;
    margin-bottom: 14px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tech-badge {
    background: rgba(201, 162, 39, 0.08);
    border: 1px solid rgba(201, 162, 39, 0.12);
    color: var(--gold-light);
    font-size: 0.68rem;
    padding: 3px 9px;
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    transition: background 0.2s;
}

.tech-badge:hover {
    background: rgba(201, 162, 39, 0.16);
}

/* ---- Load More ---- */
.project-hidden {
    display: none !important;
}

.project-revealed {
    animation: fadeInUp 0.5s ease both;
}

.load-more-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0px;
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--gold-hero-2);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.25s;
}

.load-more-btn:hover {
    background: rgba(201, 162, 39, 0.08);
    border-color: var(--gold-dim);
    transform: translateY(-2px);
}

.load-more-btn-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 22px;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .projects-row {
        grid-template-columns: 1fr;
    }

    .project-img-wrap {
        height: 150px;
    }
}

/* ===== CERTIFICATIONS ===== */
#certifications {
    background: none;
}

.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1300px;
    margin: 0 auto;
}

.cert-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    position: relative;
}

.cert-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-dim);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.hackathon-card {
    border-color: rgba(201, 162, 39, 0.25);
    position: relative;
    overflow: hidden;
}

.hackathon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
}

.cert-icon-wrap {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--gold-dim), rgba(201, 162, 39, 0.1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.cert-issuer {
    font-size: 0.72rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 8px;
}

.cert-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 8px;
    line-height: 1.4;
}

.cert-desc {
    font-size: 0.82rem;
    color: #7788aa;
    line-height: 1.6;
    flex: 1;
}

.cert-date {
    margin-top: 14px;
    font-size: 0.75rem;
    color: var(--gold-dim);
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== CONTACT ===== */
#contact {
    position: relative;
    overflow: hidden;
    text-align: center;
    isolation: isolate;
    background: var(--navy);
}

/* animated background */
body:not(.light) #contact::before {
    content: "";
    position: absolute;
    inset: -5%;

    background:
        linear-gradient(to bottom,
            rgba(var(--navy-rgb), 0.75),
            rgba(var(--navy-mid-rgb), 0.88)),
        url("../static/footer_image/footer.webp");

    background-size: cover;
    background-position: center right;

    animation: cinematicPan 8s ease-in-out infinite alternate;

    transform-origin: center;

    z-index: -2;

    will-change: transform;
}

body:not(.light) #contact::after {
    content: "";
    position: absolute;
    inset: 0;

    /* ONLY glow effect */
    background: radial-gradient(circle at calc(100vw - 350px) 50%,
            rgba(255, 255, 255, 0.25),
            transparent 60%);

    animation: glowPulse 4s ease-in-out infinite alternate;

    z-index: -1;
}

body.light #contact::before {
    content: "";
    position: absolute;
    inset: -5%;

    background: url("../static/footer_image/footer.webp");
    background-size: cover;
    background-position: center right;
    filter: brightness(0.35) contrast(1.1) saturate(2.3) grayscale(0.3) blur(1px);

    animation: cinematicPan 8s ease-in-out infinite alternate;
    transform-origin: center;

    z-index: -2;
    will-change: transform;
}


body.light #contact::after {
    content: "";
    position: absolute;
    inset: 0;

    background:
        linear-gradient(to bottom,
            rgba(var(--navy-rgb), 0.75),
            rgba(var(--navy-mid-rgb), 0.88)),
        radial-gradient(circle at calc(100vw - 350px) 50%,
            rgba(255, 255, 255, 0.3),
            transparent 60%);

    animation: glowPulse 4s ease-in-out infinite alternate;

    z-index: -1;
}

/* cinematic slow drift */
@keyframes cinematicPan {
    0% {
        transform: scale(1) translate3d(0, 0, 0);
    }

    50% {
        transform: scale(1.06) translate3d(-10px, -6px, 0);
    }

    100% {
        transform: scale(1.1) translate3d(12px, -12px, 0);
    }
}

/* ambient lighting pulse */
@keyframes glowPulse {
    from {
        opacity: 0.4;
        transform: scale(1);
    }

    to {
        opacity: 1;
        transform: scale(1.08);
    }
}

.contact-inner {
    max-width: 700px;
    margin: 0 auto;
    z-index: 1000;
}

.contact-tagline {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.7;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 40px;
    padding: 14px 28px;
    margin-bottom: 40px;
    text-decoration: none;
    color: var(--gold);
    font-size: 1rem;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.3s;
}

.contact-email:hover {
    border-color: var(--gold);
    box-shadow: 0 0 30px rgba(201, 162, 39, 0.15);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
}

.social-btn {
    width: 52px;
    height: 52px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.15rem;
    transition: all 0.3s;
}

.social-btn:hover {
    color: var(--gold);
    border-color: var(--gold-dim);
    transform: translateY(-3px);
    background: rgba(201, 162, 39, 0.05);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.back-to-top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gold-hero-2);
    text-decoration: none;
    font-size: 0.8rem;
    transition: opacity 0.2s;
}

.back-to-top:hover {
    opacity: 0.7;
}

/* ===== FLOATING CV BUTTON ===== */
.fab-cv {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--gold-dim), var(--gold));
    color: var(--navy);
    font-weight: 700;
    font-size: 0.7rem;
    padding: 14px 10px;
    border-radius: 10px 0 0 10px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 200;
    box-shadow: -4px 0 20px rgba(201, 162, 39, 0.3);
    transition: all 0.3s;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 1px;
}

.fab-cv:hover {
    padding-right: 14px;
    box-shadow: -8px 0 30px rgba(201, 162, 39, 0.4);
}

.fab-cv i {
    font-size: 0.9rem;
    writing-mode: horizontal-tb;
}

.fab-cv span {
    writing-mode: vertical-lr;
    transform: rotate(180deg);
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 48px;
    height: 48px;
    z-index: 200;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--gold);
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.theme-toggle:hover {
    border-color: var(--gold);
    transform: scale(1.05);
}

/* ===== FAB ===== */
.fab-container {
    position: fixed;
    bottom: 90px;
    right: 28px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fab {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #1a3058, #102040);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--gold);
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(201, 162, 39, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: 700;
}

.fab:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 30px rgba(201, 162, 39, 0.4);
}

.fab-cv-small {
    font-weight: 700;
    font-size: 0.7rem;
    padding: 14px 10px;
    gap: 2px;
    text-orientation: mixed;
    letter-spacing: 1px;
}

.fab-cv-small,
.fab-contact {
    background: linear-gradient(135deg, var(--gold-dim), var(--gold));
    color: var(--navy);
    border: 1px solid var(--card-border);
    box-shadow: none;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

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

/* ===== RESPONSIVE ===== */
@media (min-width: 900px) {
    .fab-cv-small {
        display: none;
    }
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* Profile image STAYS visible on mobile */
    .hero-image-wrap {
        display: flex;
        justify-content: center;
    }

    .profile-ring {
        width: 260px;
        height: 260px;
    }

    .profile-img {
        width: 260px;
        height: 260px;
    }

    .float-badge-3 {
        display: none;
    }

    .float-badge-1 {
        left: -10px;
        bottom: 10px;
        font-size: 0.7rem;
        padding: 7px 10px;
    }

    .float-badge-2 {
        right: -10px;
        top: 10px;
        font-size: 0.7rem;
        padding: 7px 10px;
    }

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

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

    .hero-tagline {
        margin: 0 auto 20px;
    }

    .hero-ai-chips {
        justify-content: center;
    }

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

    .about-image-side {
        display: none;
    }

    .nav-links {
        display: none;
    }

    .nav-cv-btn {
        display: none;
    }

    .hamburger {
        display: block;
    }

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

    .fab-cv {
        display: none;
    }

    .cursor-glow {
        display: none !important;
    }
}

@media (max-width: 600px) {
    section {
        padding: 50px 5%;
    }

    .hero-stats {
        gap: 24px;
    }

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

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

/* ===== EXPERIENCE TIMELINE ===== */
#experience {
    background: none;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 34px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--gold), rgba(var(--gold-rgb), 0.1));
}

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

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

.timeline-dot {
    position: absolute;
    left: -34px;
    top: 26px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--navy);
    border: 2px solid var(--gold);
    box-shadow: 0 0 0 4px rgba(var(--gold-rgb), 0.12);
}

.timeline-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 24px 28px;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.timeline-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold-dim);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.timeline-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px 20px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.timeline-role {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--cream-2);
    margin: 0 0 4px;
}

.timeline-org {
    font-size: 0.92rem;
    color: var(--gold);
}

.timeline-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: #8899aa;
    white-space: nowrap;
    padding-top: 4px;
}

.timeline-list {
    margin: 0 0 14px;
    padding-left: 18px;
    color: #aabbcc;
    font-size: 0.93rem;
    line-height: 1.7;
}

.timeline-list li {
    margin-bottom: 6px;
}

.timeline-list a {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 3px;
}

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

.timeline-tags span {
    background: rgba(var(--gold-rgb), 0.08);
    border: 1px solid var(--card-border);
    color: #e8c547;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    padding: 4px 11px;
    border-radius: 20px;
}

/* ===== SKILL CHIPS ===== */
.skill-card-title {
    margin-bottom: 16px;
}

.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    padding: 6px 13px;
    border-radius: 20px;
    border: 1px solid var(--gold);
    color: #e8c547;
    transition: transform 0.2s, background 0.2s;
}

.skill-chip:hover {
    transform: translateY(-1px);
}

.skill-chip.strong {
    background: rgba(var(--gold-rgb), 0.22);
    border-color: var(--gold);
}

.skill-chip.comfortable {
    background: rgba(var(--gold-rgb), 0.07);
    border-color: rgba(var(--gold-rgb), 0.55);
}

.skill-chip.foundational {
    background: transparent;
    border: 1px dashed rgba(var(--gold-rgb), 0.5);
    color: #8899aa;
}

.skill-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 26px;
    margin-top: 26px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.skill-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    border: 1px solid var(--gold);
    vertical-align: middle;
}

.skill-dot.strong {
    background: rgba(var(--gold-rgb), 0.7);
}

.skill-dot.comfortable {
    background: rgba(var(--gold-rgb), 0.18);
}

.skill-dot.foundational {
    background: transparent;
    border-style: dashed;
}

@media (max-width: 600px) {
    .timeline {
        padding-left: 28px;
    }

    .timeline-dot {
        left: -28px;
    }

    .timeline-card {
        padding: 20px 18px;
    }

    .timeline-date {
        white-space: normal;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
