:root {
    --bg-color: #050816;
    --card-bg: rgba(17, 25, 40, 0.75);
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --accent-pink: #f472b6; /* Light Pink */
    --rgb-gradient: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
}

@keyframes nav-glow {
    0% { border-bottom-color: var(--accent-pink); }
    33% { border-bottom-color: var(--accent-cyan); }
    66% { border-bottom-color: var(--accent-purple); }
    100% { border-bottom-color: var(--accent-pink); }
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #050816;
    background-image: 
        linear-gradient(rgba(5, 8, 22, 0.4), rgba(5, 8, 22, 0.4)),
        url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=1920&q=80'); /* Vibrant Ocean Sunset */
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* RGB BACKGROUND ANIMATION */
.rgb-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
    filter: blur(80px);
}

.rgb-mesh::before, .rgb-mesh::after {
    content: '';
    position: absolute;
    width: 40vmax;
    height: 40vmax;
    border-radius: 50%;
    animation: move 20s infinite alternate;
}

.rgb-mesh::before {
    background: var(--accent-blue);
    left: -10%;
    top: -10%;
}

.rgb-mesh::after {
    background: var(--accent-pink);
    right: -10%;
    bottom: -10%;
    animation-delay: -10s;
}

@keyframes move {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(20vw, 20vh) scale(1.2); }
}

/* NAVBAR */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10%;
    background: rgba(255, 255, 255, 0.1); /* Lighter Glassmorphism */
    backdrop-filter: blur(25px);
    border-bottom: 2px solid var(--accent-pink);
    animation: nav-glow 6s infinite linear;
    position: sticky;
    top: 0;
    z-index: 1000;
}

@keyframes nav-glow {
    0% { border-bottom-color: #ff0000; box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3); }
    20% { border-bottom-color: #ffb700; box-shadow: 0 4px 15px rgba(255, 183, 0, 0.3); }
    40% { border-bottom-color: #00ff00; box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3); }
    60% { border-bottom-color: #00ffff; box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3); }
    80% { border-bottom-color: #0000ff; box-shadow: 0 4px 15px rgba(0, 0, 255, 0.3); }
    100% { border-bottom-color: #ff0000; box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3); }
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    height: 35px;
    width: auto;
}

nav h1 {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, var(--accent-pink), #8be9fd); /* Brighter cyan-blue for end of gradient */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'JetBrains Mono', monospace;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

nav ul {
    display: flex;
    gap: 25px;
    list-style: none;
}

nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
    transition: 0.3s;
}

nav a:hover, nav a.active {
    color: var(--accent-pink);
    text-shadow: 0 0 8px rgba(244, 114, 182, 0.5);
}

/* HERO SECTION */
.hero {
    text-align: center;
    padding: 120px 20px 80px;
    position: relative;
}

.hero h2 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: -2px;
    line-height: 1.1;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    font-family: 'JetBrains Mono', monospace;
}

/* CARDS */
.card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-pink);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(244, 114, 182, 0.2);
}

.card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
}

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

/* SECTION */
section {
    max-width: 1100px;
    margin: auto;
    padding: 80px 25px;
}

h2.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
}

h2.section-title::after {
    content: '';
    height: 1px;
    flex-grow: 1;
    background: linear-gradient(to right, var(--accent-pink), transparent);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

/* LOGOS */
.logo-display {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.logo-large {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

/* PROFILE */
.profile-img-portrait {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 3 / 4; /* Portrait Rectangle */
    object-fit: cover;
    border-radius: 15px;
    border: 2px solid var(--accent-pink);
}

/* ABOUT SECTION */
.about-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 850px) {
    .about-container { grid-template-columns: 1fr; text-align: center; }
    .profile-img-portrait { margin: 0 auto; }
}

/* IMAGE GRID */
.activity-img-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.activity-img-wrap img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}

.full-card-img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 20px;
    background: rgba(0,0,0,0.2);
}

/* GAME */
.game-container {
    text-align: center;
    padding: 40px;
    background: rgba(0,0,0,0.3);
    border-radius: 20px;
    margin-top: 40px;
}

.game-btn {
    padding: 10px 20px;
    margin: 10px;
    border-radius: 8px;
    border: 1px solid var(--accent-pink);
    background: transparent;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

.game-btn:hover {
    background: var(--accent-pink);
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 12px;
    background: var(--accent-pink);
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    border: none;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(244, 114, 182, 0.4);
}

/* SYSTEM BOOT LOADER */
#loader {
    position: fixed;
    inset: 0;
    background: #050816;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.loader-content {
    width: 300px;
    font-family: 'JetBrains Mono', monospace;
}

.boot-text {
    color: var(--accent-pink);
    font-size: 0.9rem;
    margin-bottom: 5px;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--accent-pink);
    width: 0;
    animation: typing 1.5s steps(30, end) forwards, blink 0.5s step-end infinite;
}

.progress-bar-wrap {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(to right, var(--accent-pink), var(--accent-cyan));
    animation: load 2s ease-in-out forwards;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink {
    from, to { border-color: transparent }
    50% { border-color: var(--accent-pink) }
}

@keyframes load {
    0% { width: 0% }
    50% { width: 70% }
    100% { width: 100% }
}

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

/* TIMELINE */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 60px auto;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent-pink), var(--accent-cyan), var(--accent-purple));
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; text-align: left; }

.timeline-dot {
    position: absolute;
    top: 25px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 3px solid var(--accent-pink);
    z-index: 10;
    box-shadow: 0 0 10px var(--accent-pink);
}

.timeline-item:nth-child(odd) .timeline-dot { right: -8px; }
.timeline-item:nth-child(even) .timeline-dot { left: -8px; }

.timeline-content {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.timeline-item:hover .timeline-content {
    border-color: var(--accent-pink);
    box-shadow: 0 0 20px rgba(244, 114, 182, 0.2);
}

.timeline-year {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    color: var(--accent-pink);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .timeline::before { left: 30px; }
    .timeline-item { width: 100%; left: 0 !important; text-align: left !important; padding-left: 60px; }
    .timeline-dot { left: 22px !important; }
}

/* SKILL DASHBOARD */
.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.skill-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.skill-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--accent-pink), var(--accent-cyan));
    width: 0;
    transition: width 1.5s cubic-bezier(0.1, 0.5, 0.2, 1);
}

.skill-card:hover {
    border-color: var(--accent-pink);
    background: rgba(255, 255, 255, 0.05);
}

/* CUSTOM CURSOR */
#cursor-dot, #cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10000;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

#cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-pink);
}

#cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-cyan);
}

body:hover #cursor-dot,
body:hover #cursor-outline {
    opacity: 1;
}

@media (max-width: 768px) {
    #cursor-dot, #cursor-outline { display: none; }
    body { cursor: auto !important; }
}

/* FULL WIDTH ROWS FOR ROBOTICS */
.full-row {
    width: 100%;
    margin-bottom: 40px;
}

.img-row {
    display: flex;
    gap: 15px;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 10px;
}

.img-row img {
    flex: 1;
    min-width: 0;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

.img-row img:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-5px);
}

.split-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 25px;
    align-items: start;
}

@media (max-width: 900px) {
    .split-row { grid-template-columns: 1fr; }
    .img-row { flex-wrap: wrap; }
    .img-row img { height: 200px; min-width: 45%; }
}

/* MODAL POPUP */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(5, 8, 22, 0.9);
    backdrop-filter: blur(15px);
    overflow-y: auto;
    padding: 40px 20px;
}

.modal-content {
    max-width: 900px;
    margin: auto;
    background: var(--card-bg);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: var(--accent-pink);
    cursor: pointer;
    transition: 0.3s;
}

.modal-close:hover {
    transform: rotate(90deg) scale(1.1);
}

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

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

.spec-item {
    border-left: 3px solid var(--accent-cyan);
    padding-left: 15px;
}

.spec-label {
    font-size: 0.7rem;
    color: var(--accent-pink);
}

.spec-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.spec-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    border: 1px solid var(--accent-cyan);
    border-radius: 8px;
    color: var(--accent-cyan);
    font-size: 0.75rem;
    cursor: pointer;
    background: transparent;
    transition: 0.3s;
}

.spec-btn:hover {
    background: var(--accent-cyan);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--accent-cyan);
}

.mono { font-family: 'JetBrains Mono', monospace; }
.accent { color: var(--accent-pink); }
.silver { color: #cbd5e1; }
