/* --- Core Variables & Design Tokens --- */
:root {
    --bg-deep: #030712;
    --bg-card: rgba(17, 24, 39, 0.6);
    --accent-glow: #4f46e5;
    --accent-cyan: #06b6d4;
    --accent-magenta: #d946ef;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --border-tech: rgba(99, 102, 241, 0.15);
    --font-head: 'Syne', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100%;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    position: relative;
}

/* ==========================================================================
   MATRIX BACKGROUND CONFIGURATION (GRID VISIBILITY ENHANCED TO 0.09)
   ========================================================================== */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(to right, rgba(99, 102, 241, 0.09) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(99, 102, 241, 0.09) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: -1;
}

/* ==========================================================================
   GLOBAL STRUCTURE & UTILITY STANDARDS
   ========================================================================== */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 2rem 0 2rem;
}

section {
    padding: 4rem 0;
    width: 100%;
}

.section-header {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    margin-bottom: 2.5rem;
    font-family: var(--font-head);
    font-weight: 800;
    line-height: 1.1;
}

.section-tag {
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: var(--accent-magenta);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

/* ==========================================================================
   HERO LAYOUT ENGINE ARCHITECTURE
   ========================================================================== */
.hero-section {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    padding: 4rem 0;
}

.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 400px; 
    gap: 4rem;
    width: 100%;
    align-items: center;
}

.hero-title-lockbox {
    position: relative;
    width: 100%;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.8rem, 4.5vw, 4.8rem);
    line-height: 1.05;
    font-family: var(--font-head);
    font-weight: 800;
    letter-spacing: -0.02em;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.hero-right {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-image-frame {
    border: 1px solid var(--border-tech);
    padding: 0.8rem;
    background: var(--bg-card);
    border-radius: 12px;
    width: 100%;
    aspect-ratio: 1 / 1;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

/* ==========================================================================
   INFINITE TICKER REALIGNMENT
   ========================================================================== */
.infinite-ticker-container {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%); 
    background: rgba(99, 102, 241, 0.02); 
    border-top: 1px solid var(--border-tech); 
    border-bottom: 1px solid var(--border-tech);
    padding: 1.5rem 0; 
    overflow: hidden; 
    margin: 2rem 0;
}

.ticker-wrapper {
    width: 100%;
    overflow: hidden;
}

.ticker-track { 
    display: flex; 
    align-items: center;
    white-space: nowrap; 
    gap: 4.5rem; 
    width: max-content; 
}

.ticker-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    display: inline-block;
    filter: brightness(140%);
    opacity: 0.7;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ticker-logo:hover {
    filter: grayscale(0%) brightness(100%);
    opacity: 1;
    transform: scale(1.15);
}

/* ==========================================================================
   ABOUT ME SECTION ALIGNMENTS
   ========================================================================== */
.about-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.about-visual .tech-box-frame {
    border: 1px solid var(--border-tech);
    padding: 0.8rem;
    background: var(--bg-card);
    border-radius: 12px;
    width: 100%;
    aspect-ratio: 4 / 3;
}

/* ==========================================================================
   HORIZONTAL SCROLL ENGINE DEPLOYMENTS (NATURAL PIN TRACK CODES)
   ========================================================================== */
.skills-horizontal-track {
    width: 100%;
    height: 200vh; /* Tightened height to reduce empty scrolling vertical space */
    position: relative;
    padding: 0 !important;
}

.horizontal-sticky-viewport {
    position: relative; /* Let GSAP handle pinning dynamically */
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.skills-title-block {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    margin-bottom: 2.5rem;
}

.skills-title-block .section-header {
    margin-bottom: 0;
}

.horizontal-scroll-canvas {
    display: flex;
    align-items: center;
    gap: 3.5rem; 
    padding: 0 20vw 0 calc(50vw - min(600px, 45vw)); 
    width: max-content;
    will-change: transform;
    /* Soft matrix transition curve makes card translation extremely fluid */
    transition: transform 0.1s ease-out;
    box-sizing: border-box; 
}

.horizontal-slide {
    width: 320px;
    flex-shrink: 0;
}

.horizontal-slide.introduction-slide {
    width: 400px;
    margin-right: 1.5rem; 
}

/* ==========================================================================
   VERTICAL PROJECTS TRACK (VERTICAL PERSPECTIVE SCROLL ANIMATION)
   ========================================================================== */
.projects-vertical-track {
    width: 100%;
    padding: 6rem 0;
    display: flex;
    flex-direction: column;
}

.projects-vertical-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem; 
    width: 100%;
    margin-top: 2rem;
}

.vertical-project-card-wrapper {
    width: 100%;
    opacity: 0;
    transform: translateY(50px);
}

.stacking-card { 
    background: #070b16; 
    border: 1px solid var(--border-tech); 
    border-radius: 12px; 
    padding: 2.5rem; 
    width: 100%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-inner-grid {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 3rem;
    align-items: center;
}

.project-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   EXPERIENCE TIMELINE MODULE
   ========================================================================== */
.experience-3d-section {
    position: relative;
    display: flex;
    flex-direction: column;
}

.timeline-3d-perspective-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    perspective: 1000px;
    position: relative;
    margin-top: 2rem;
}

.timeline-3d-card {
    background: var(--bg-card);
    border: 1px solid var(--border-tech);
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    
    opacity: 0;
    transform: rotateX(12deg) translateY(40px);
}

/* ==========================================================================
   CONTACT SECTION (CLEAN 2-COLUMN STRUCTURE)
   ========================================================================== */
.contact-wrapper { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 4rem; 
    align-items: start; 
}

.contact-details-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-details-panel .section-header {
    margin-bottom: 1.5rem;
}

.contact-details-panel p.paragraph-highlight {
    font-size: 1.3rem;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    font-weight: 600;
}

.secure-contact-form { 
    background: var(--bg-card); 
    border: 1px solid var(--border-tech); 
    padding: 2.5rem; 
    display: flex; 
    flex-direction: column; 
    gap: 1.5rem; 
    border-radius: 12px; 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.form-input-pair { display: flex; flex-direction: column; gap: 0.5rem; }
.form-input-pair label { font-family: var(--font-code); font-size: 0.75rem; color: var(--text-secondary); }
.secure-contact-form input, .secure-contact-form textarea { width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--border-tech); padding: 0.8rem; color: white; border-radius: 6px; outline: none; font-family: var(--font-body); }
.secure-contact-form textarea { height: 110px; resize: none; }
.btn-submit { font-family: var(--font-code); padding: 1rem; background: var(--text-primary); color: var(--bg-deep); border: none; cursor: pointer; border-radius: 6px; font-weight: 700; transition: background 0.2s; }
.btn-submit:hover { background: var(--accent-cyan); }

/* ==========================================================================
   CORE INTERACTION AND FRAMEWORK INDICATORS
   ========================================================================== */
.scroll-progress-indicator {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 5px;
    background: linear-gradient(90deg, var(--accent-magenta), var(--accent-cyan), var(--accent-glow));
    transform-origin: 0% 50%; transform: scaleX(0); z-index: 100000;
    animation: pipelineProgress linear both; animation-timeline: scroll(root);
}
@keyframes pipelineProgress { to { transform: scaleX(1); } }

.text-reveal-trigger {
    view-timeline-name: --section-reveal; view-timeline-axis: block;
    animation: entryFadeReveal linear both; animation-timeline: --section-reveal; animation-range: entry 5% entry 60%;
}
@keyframes entryFadeReveal {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.navbar { width: 100%; height: 80px; border-bottom: 1px solid var(--border-tech); background: rgba(3, 7, 18, 0.85); backdrop-filter: blur(12px); position: fixed; top: 0; left: 0; z-index: 9999; }
.nav-container { max-width: 1200px; height: 100%; margin: 0 auto; padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-family: var(--font-code); font-weight: 700; color: var(--accent-cyan); }
.nav-links { display: flex; list-style: none; gap: 2.5rem; }
.nav-link { font-family: var(--font-code); font-size: 0.85rem; color: var(--text-secondary); text-decoration: none; }
.btn-cv { font-family: var(--font-code); font-size: 0.8rem; padding: 0.5rem 1.2rem; border: 1px solid var(--border-tech); border-radius: 4px; color: white; text-decoration: none; }
.hamburger { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }

.hero-eyebrow { font-family: var(--font-code); font-size: 0.85rem; color: var(--accent-cyan); margin-bottom: 0.5rem; }
.hero-subtitle { font-family: var(--font-code); margin-bottom: 1.5rem; color: var(--text-secondary); font-size: 1.1rem; }
.accent { color: var(--accent-magenta); }
.hero-description { color: var(--text-secondary); line-height: 1.6; font-size: 1.05rem; }
.hero-cta-group { display: flex; gap: 1.2rem; margin-top: 2rem; }
.btn-primary { font-family: var(--font-code); padding: 0.8rem 1.8rem; background: var(--text-primary); color: var(--bg-deep); border-radius: 4px; text-decoration: none; font-weight: 700; }
.btn-secondary { font-family: var(--font-code); padding: 0.8rem 1.8rem; border: 1px solid var(--border-tech); color: var(--text-primary); border-radius: 4px; text-decoration: none; }

.system-status-board { border: 1px solid var(--border-tech); padding: 1rem; font-family: var(--font-code); font-size: 0.75rem; background: rgba(5,5,10,0.4); border-radius: 6px; }
.status-metric { display: flex; justify-content: space-between; margin-bottom: 0.4rem; }
.status-metric:last-child { margin-bottom: 0; }
.status-green { color: #10b981; }

.paragraph-highlight { font-size: 1.25rem; margin-bottom: 1.2rem; line-height: 1.6; color: var(--text-primary); }
.paragraph-body { color: var(--text-secondary); line-height: 1.7; font-size: 1rem; margin-bottom: 1.5rem; }
.stats-dashboard { display: flex; gap: 1rem; margin-top: 2.5rem; }
.stat-node { border: 1px solid var(--border-tech); padding: 1.2rem; flex: 1; border-radius: 6px; background: rgba(255,255,255,0.01); }
.stat-number { font-size: 2.2rem; font-family: var(--font-head); color: var(--accent-cyan); font-weight: 800; }
.stat-label { font-size: 0.75rem; color: var(--text-secondary); font-family: var(--font-code); margin-top: 0.25rem; }

.tech-icon-card { 
    background: var(--bg-card); 
    border: 1px solid var(--border-tech); 
    padding: 2.5rem 1.5rem; 
    text-align: center; 
    border-radius: 8px; 
    backdrop-filter: blur(8px); 
    width: 100%; 
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.tech-icon-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
}

.tech-card-logo {
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto 1.5rem auto;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tech-icon-card:hover .tech-card-logo {
    transform: scale(1.1) translateY(-4px);
}

.tech-name { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; }
.tech-progress-mini { height: 3px; background: rgba(255,255,255,0.08); margin-top: 1.2rem; overflow: hidden; position: relative; }
.mini-fill { height: 100%; background: linear-gradient(90deg, var(--accent-cyan), var(--accent-glow)); width: 0%; }
.mini-fill.animate-bar { width: var(--target-width); }

.project-index { font-family: var(--font-code); color: var(--accent-cyan); font-size: 0.8rem; display: block; margin-bottom: 0.5rem; }
.project-details h3 { font-size: 1.8rem; margin-bottom: 1rem; font-family: var(--font-head); }
.project-details p { color: var(--text-secondary); line-height: 1.6; }
.project-stack-tags { display: flex; gap: 0.5rem; margin-top: 1.5rem; }
.project-stack-tags span { font-family: var(--font-code); font-size: 0.7rem; background: rgba(99, 102, 241, 0.08); border: 1px solid rgba(99, 102, 241, 0.15); padding: 0.2rem 0.6rem; border-radius: 4px; }

.company-sub { font-family: var(--font-code); font-size: 0.9rem; color: var(--accent-cyan); margin: 0.2rem 0 1rem 0; }
.timeline-meta-tag { font-family: var(--font-code); font-size: 0.75rem; color: var(--accent-magenta); margin-bottom: 0.5rem; }

.channel-row { display: flex; align-items: center; gap: 1rem; font-family: var(--font-code); }
.channel-icon { color: var(--accent-cyan); }
.channel-row a { color: var(--text-primary); text-decoration: none; border-bottom: 1px dashed var(--accent-cyan); }

.section-pipeline-divider { height: 1px; background: var(--border-tech); margin: 2rem 0; position: relative; display: flex; justify-content: center; align-items: center; }
.pipeline-node { width: 8px; height: 8px; background: var(--accent-cyan); transform: rotate(45deg); }
.system-footer { border-top: 1px solid var(--border-tech); padding: 2rem; margin-top: 4rem; }
.footer-content { display: flex; justify-content: space-between; max-width: 1200px; margin: 0 auto; color: var(--text-secondary); font-size: 0.85rem; }

.custom-cursor-dot, .custom-cursor-ring { position: fixed; pointer-events: none; border-radius: 50%; transform: translate(-50%, -50%); z-index: 100000; }
.custom-cursor-dot { width: 6px; height: 6px; background: white; }
.custom-cursor-ring { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,0.25); transition: transform 0.08s cubic-bezier(0.25, 1, 0.5, 1); }

/* ==========================================================================
   RESPONSIVE LAYOUT ENGINE CODES
   ========================================================================== */
@media (max-width: 968px) {
    .hero-content { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-right { max-width: 400px; margin: 0 auto; }
    .about-layout, .contact-wrapper { grid-template-columns: 1fr; gap: 2.5rem; }
    .skills-horizontal-track { height: auto !important; position: relative !important; }
    .horizontal-sticky-viewport { position: relative; height: auto; overflow: visible; }
    .skills-title-block { padding: 0; }
    .horizontal-scroll-canvas { display: flex; flex-direction: column; width: 100%; padding: 0; gap: 1.5rem; transform: none !important; }
    .horizontal-slide, .horizontal-slide.introduction-slide { width: 100%; margin-right: 0; }
    .card-inner-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .hamburger { display: block; }
    .nav-links { display: none; }
}