/* --- Cyberpunk / Terminal Theme --- */
:root {
    --bg-color: #050505;
    --panel-bg: rgba(10, 15, 10, 0.85);
    
    --accent-primary: #00ff41; /* Matrix Green */
    --accent-secondary: #00f0ff; /* Electric Cyan */
    --accent-alert: #ff003c; /* Cyberpunk Red */
    
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-mono: 'Fira Code', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Custom cursor everywhere */
}

html {
    scroll-behavior: auto; /* Let GSAP handle scrolling if needed, but smooth scrolling is fine if not interfering with ScrollTrigger */
}

body {
    font-family: var(--font-mono);
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
    /* Subtle grid background */
    background-image: 
        linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

section {
    padding: 3.5rem 0;
    position: relative;
    z-index: 2;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
}

.section-title {
    font-family: var(--font-mono);
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--accent-secondary);
    border-bottom: 1px dashed var(--accent-secondary);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.prompt {
    color: var(--accent-primary);
    font-weight: bold;
    margin-right: 0.5rem;
}

a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}
a:hover {
    color: var(--accent-primary);
    text-shadow: 0 0 8px var(--accent-primary);
}

/* --- Header --- */
header {
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
    box-shadow: 0 4px 20px rgba(0, 255, 65, 0.05);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--accent-primary);
    font-weight: 700;
}

header ul {
    display: flex;
    list-style: none;
}
header ul li {
    margin-left: 2rem;
}
header ul li a {
    font-size: 0.95rem;
    color: var(--text-muted);
}
header ul li a:hover {
    color: var(--accent-secondary);
}

/* --- Particles Background --- */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

/* --- Hero Section & Terminal Window --- */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 100px;
    position: relative; /* Ensure relative positioning for canvas */
}

#crypt-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.15; /* Subtle background overlay */
}

.terminal-window {
    background: var(--panel-bg);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 255, 65, 0.1);
    overflow: hidden;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    /* initial state for GSAP */
    opacity: 0;
    transform: translateY(30px);
}

.terminal-header {
    background: #1a1a1a;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 255, 65, 0.3);
}

.btn-mac {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}
.btn-mac.red { background: #ff5f56; }
.btn-mac.yellow { background: #ffbd2e; }
.btn-mac.green { background: #27c93f; }

.terminal-title {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: auto;
    margin-right: auto;
    font-family: var(--font-heading);
}

.terminal-body {
    padding: 3rem;
}

#hero h1 {
    font-size: 3.5rem;
    color: #fff;
    margin: 1rem 0;
    text-shadow: 0 0 10px rgba(255,255,255,0.2);
    min-height: 4.2rem;
}

#hero h2 {
    font-size: 1.5rem;
    color: var(--accent-secondary);
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
    min-height: 2rem;
}

.terminal-body .subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin-bottom: 2.5rem;
    min-height: 4.8rem;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    opacity: 0; /* GSAP reveals this */
}

.btn {
    padding: 12px 24px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    background: transparent;
}

.github-btn {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: inset 0 0 10px rgba(0, 255, 65, 0.1);
}
.github-btn:hover {
    background: rgba(0, 255, 65, 0.15);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.4), inset 0 0 20px rgba(0, 255, 65, 0.2);
}

.btn-secondary {
    border-color: var(--text-muted);
    color: var(--text-main);
}
.btn-secondary:hover {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
    background: rgba(0, 240, 255, 0.1);
}

.social-links-side {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 100;
    opacity: 0;
}
.social-links-side a {
    font-size: 1.5rem;
    color: var(--text-muted);
}
.social-links-side a:hover {
    color: var(--accent-primary);
    transform: scale(1.1);
}

/* --- Terminal Panels (General) --- */
.terminal-panel {
    background: var(--panel-bg);
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-left: 3px solid var(--accent-primary);
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    /* Initial state for GSAP */
    opacity: 0;
    transform: translateY(20px);
}

/* GSAP standard reveal elements */
.gsap-reveal {
    opacity: 0;
    transform: translateY(20px);
}

/* --- About --- */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 5rem;
    align-items: center;
}
.image-wrapper {
    position: relative;
    border: 1px solid var(--accent-primary);
    padding: 5px;
    background: rgba(0, 255, 65, 0.05);
}
.image-wrapper img {
    width: 100%;
    display: block;
    filter: grayscale(100%) contrast(1.2);
    transition: filter 0.3s ease;
}
.image-wrapper:hover img {
    filter: grayscale(0%) contrast(1);
}

/* Scanline Effect */
.scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0, 255, 65, 0.2) 50%,
        rgba(0, 255, 65, 0.2)
    );
    background-size: 100% 4px;
    pointer-events: none;
    opacity: 0.3;
    z-index: 10;
}

/* --- Experience Timeline --- */
.experience-timeline-new {
    border-left: 2px dashed rgba(0, 240, 255, 0.3);
    margin-left: 1rem;
    padding-left: 3rem;
    margin-top: 2rem;
}
.exp-entry {
    margin-bottom: 3rem;
    position: relative;
    opacity: 0; /* GSAP */
    transform: translateX(-20px);
}
.exp-entry::before {
    content: '>';
    position: absolute;
    left: -4.2rem;
    top: 0.5rem;
    color: var(--accent-secondary);
    font-weight: bold;
    font-size: 1.2rem;
    background: var(--bg-color);
    padding: 0 5px;
}
.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.exp-header h3 {
    color: var(--accent-secondary);
    font-family: var(--font-mono);
}
.exp-date {
    color: var(--accent-primary);
    font-size: 0.9rem;
}
.exp-company {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.exp-details li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    list-style: none;
}
.exp-details li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* --- Projects Section --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}
.cyberpunk-card {
    background: var(--panel-bg);
    border: 1px solid rgba(0, 255, 65, 0.2);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease; /* Tilt handles transform */
    opacity: 0; /* GSAP */
    transform: translateY(30px);
}
.cyberpunk-card:hover {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.project-img-placeholder {
    height: 180px;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--accent-primary);
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
    position: relative;
}
.project-img-wrapper {
    position: relative;
    height: 180px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
}
.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(80%) sepia(20%) hue-rotate(80deg);
    transition: filter 0.3s ease;
}
.cyberpunk-card:hover .project-img-wrapper img {
    filter: none;
}

.project-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.project-card-content h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #fff;
}
.project-card-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.tech-stack span {
    background: rgba(0, 255, 65, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(0, 255, 65, 0.3);
    padding: 2px 8px;
    font-size: 0.8rem;
}
.btn-view-project {
    align-self: flex-start;
    font-size: 0.9rem;
}

/* --- JSON Skills Section --- */
.json-container {
    overflow-x: auto;
}
.json-container pre {
    margin: 0;
}
.json-container code {
    font-family: var(--font-mono);
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.8;
}
.json-key {
    color: var(--accent-secondary);
}
.json-string {
    color: var(--accent-primary);
}

/* --- Certs --- */
.cert-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.cert-card {
    padding: 2rem;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
}
.cert-logo {
    margin-bottom: 1.5rem;
}
.cert-title {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.cert-name {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(0, 255, 65, 0.2);
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

/* --- Glitch Effect --- */
.glitch-text {
    position: relative;
    display: inline-block;
}
.glitch-text::before, .glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}
.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}
.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip: rect(74px, 9999px, 83px, 0); }
  20% { clip: rect(10px, 9999px, 50px, 0); }
  40% { clip: rect(60px, 9999px, 20px, 0); }
  60% { clip: rect(30px, 9999px, 90px, 0); }
  80% { clip: rect(80px, 9999px, 40px, 0); }
  100% { clip: rect(10px, 9999px, 70px, 0); }
}
@keyframes glitch-anim2 {
  0% { clip: rect(65px, 9999px, 100px, 0); }
  20% { clip: rect(30px, 9999px, 10px, 0); }
  40% { clip: rect(80px, 9999px, 50px, 0); }
  60% { clip: rect(20px, 9999px, 80px, 0); }
  80% { clip: rect(90px, 9999px, 30px, 0); }
  100% { clip: rect(40px, 9999px, 60px, 0); }
}

/* =================================================================
   --- NEW INTERACTIVE STYLES (CURSOR & BOOT) ---
   ================================================================= */

/* --- Custom Cursor --- */
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-primary);
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--accent-primary);
}

.cursor-ring {
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-secondary);
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s;
}

/* Hover state for cursor */
.cursor-ring.hovered {
    width: 60px;
    height: 60px;
    background-color: rgba(0, 240, 255, 0.1);
    border-color: var(--accent-primary);
}

/* Hide default cursor on interactive elements */
a, button, .hover-target {
    cursor: none;
}

/* --- Boot Sequence Overlay --- */
#boot-sequence {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    color: var(--accent-primary);
}

.boot-text {
    text-align: left;
    max-width: 600px;
    width: 100%;
    padding: 2rem;
}

.boot-text p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    opacity: 0; /* JS handles reveal */
}
.boot-text h2 {
    color: var(--accent-alert);
    font-size: 3rem;
    margin-top: 2rem;
    opacity: 0;
}

/* --- Mobile Adjustments --- */
@media (max-width: 992px) {
    .about-content { grid-template-columns: 1fr; }
    .exp-header { flex-direction: column; align-items: flex-start; }
    .exp-date { margin-top: 0.5rem; }
}

@media (max-width: 768px) {
    #hero h1 { font-size: 2.5rem; }
    .section-title { font-size: 1.5rem; }
    header nav { flex-direction: column; height: auto; padding: 1rem 0; }
    header ul { margin-top: 1rem; flex-wrap: wrap; justify-content: center; }
    header ul li { margin: 0.5rem 1rem; }
    .hero-buttons { flex-direction: column; align-items: flex-start; }
    .social-links-side { position: static; transform: none; flex-direction: row; justify-content: center; margin-top: 2rem; }
    .terminal-body { padding: 1.5rem; }
    
    /* Disable custom cursor on mobile */
    .cursor-dot, .cursor-ring { display: none; }
    * { cursor: auto !important; }
}