/* ===================================================================
   GLOBAL & VARIABLES
=================================================================== */
:root {
    --bg-dark: #05050A;
    --bg-panel: rgba(255, 255, 255, 0.03);
    --bg-panel-hover: rgba(255, 255, 255, 0.06);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-primary: #E0E0E0;
    --text-secondary: #A0A0B0;
    --accent-cyan: #00F0FF;
    --accent-purple: #7000FF;
    --accent-gradient: linear-gradient(135deg, #00F0FF 0%, #7000FF 100%);
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
    --max-width: 1200px;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background Grid */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; }
a { color: var(--accent-cyan); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-purple); text-shadow: 0 0 8px var(--accent-purple); }

/* ===================================================================
   3D TILT EFFECT BASE
=================================================================== */
.tilt-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

/* ===================================================================
   HEADER & NAV
=================================================================== */
.site-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: rgba(5, 5, 10, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-glass);
    transition: var(--transition);
}

.site-header.scrolled {
    background: rgba(5, 5, 10, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

.nav__brand { display: flex; align-items: center; gap: 0.8rem; font-size: 1.2rem; font-weight: 700; color: var(--text-primary); }
.nav__mark {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    background: var(--accent-gradient); color: #000; font-weight: 900; border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.nav__links { display: flex; gap: 2rem; list-style: none; }
.nav__links a { color: var(--text-secondary); font-weight: 500; position: relative; padding: 0.5rem 0; }
.nav__links a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: var(--accent-gradient); transition: width 0.3s ease;
}
.nav__links a:hover { color: var(--text-primary); text-shadow: none; }
.nav__links a:hover::after { width: 100%; }

.nav__cta {
    padding: 0.6rem 1.5rem; background: var(--accent-gradient); color: #000 !important;
    border-radius: 30px; font-weight: 700; box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}
.nav__cta:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 0 25px rgba(0, 240, 255, 0.6); }

.nav__toggle-input { display: none; }
.nav__toggle { display: none; cursor: pointer; flex-direction: column; gap: 5px; z-index: 1001; }
.nav__toggle span { width: 25px; height: 3px; background: var(--text-primary); border-radius: 2px; transition: 0.3s; }

/* ===================================================================
   HERO SECTION
=================================================================== */
.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    position: relative; padding: 6rem 2rem 4rem; overflow: hidden;
}

.hero__bg-grid {
    position: absolute; inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(112, 0, 255, 0.15) 0%, transparent 60%);
    z-index: -1;
}

.hero__3d-element {
    position: absolute; right: 10%; top: 50%; transform: translateY(-50%);
    perspective: 800px; z-index: 0; opacity: 0.6;
}

.cube { width: 150px; height: 150px; position: relative; transform-style: preserve-3d; animation: rotateCube 15s infinite linear; }
.cube .face {
    position: absolute; width: 150px; height: 150px;
    border: 2px solid var(--accent-cyan); background: rgba(0, 240, 255, 0.05);
    box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.2);
}
.cube .front  { transform: translateZ(75px); }
.cube .back   { transform: translateZ(-75px) rotateY(180deg); }
.cube .right  { transform: rotateY(90deg) translateZ(75px); }
.cube .left   { transform: rotateY(-90deg) translateZ(75px); }
.cube .top    { transform: rotateX(90deg) translateZ(75px); }
.cube .bottom { transform: rotateX(-90deg) translateZ(75px); }

@keyframes rotateCube {
    0% { transform: rotateX(0) rotateY(0); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

.hero__content { position: relative; z-index: 2; max-width: 800px; text-align: center; }
.hero__greeting { font-size: 1.2rem; color: var(--accent-cyan); font-family: var(--font-mono); margin-bottom: 0.5rem; letter-spacing: 2px; text-transform: uppercase; }
.hero__name {
    font-size: clamp(3rem, 8vw, 5.5rem); font-weight: 900;
    background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    line-height: 1.1; margin-bottom: 1rem;
}
.hero__typing { font-size: 1.5rem; color: var(--text-primary); margin-bottom: 1.5rem; min-height: 2.5rem; font-weight: 600; }
.cursor { animation: blink 1s infinite; color: var(--accent-cyan); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero__desc { font-size: 1.1rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto 2.5rem; }
.hero__actions { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }

.btn {
    padding: 0.9rem 2.2rem; border-radius: 30px; font-weight: 700; font-size: 1rem;
    cursor: pointer; transition: var(--transition); border: none; display: inline-block;
    text-transform: uppercase; letter-spacing: 1px;
}
.btn--primary { background: var(--accent-gradient); color: #000; box-shadow: 0 0 20px rgba(0, 240, 255, 0.4); }
.btn--primary:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 0 30px rgba(0, 240, 255, 0.7); color: #000; }
.btn--ghost { background: transparent; border: 2px solid var(--accent-cyan); color: var(--accent-cyan); }
.btn--ghost:hover { background: rgba(0, 240, 255, 0.1); transform: translateY(-3px); box-shadow: 0 0 20px rgba(0, 240, 255, 0.3); color: var(--accent-cyan); }

/* ===================================================================
   SECTIONS GENERAL
=================================================================== */
.section { padding: 6rem 0; position: relative; }
.section__title { font-size: 2.5rem; font-weight: 800; text-align: center; margin-bottom: 4rem; position: relative; display: inline-block; width: 100%; }
.section__title::after {
    content: ''; position: absolute; bottom: -15px; left: 50%; transform: translateX(-50%);
    width: 80px; height: 4px; background: var(--accent-gradient); border-radius: 2px; box-shadow: 0 0 10px var(--accent-cyan);
}

/* ===================================================================
   ABOUT SECTION
=================================================================== */
.about__grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; align-items: center; }
.about__text {
    background: var(--bg-panel); border: 1px solid var(--border-glass); border-radius: 20px;
    padding: 2.5rem; backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.about__text p { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 1.05rem; }
.about__text p:last-child { margin-bottom: 0; }
.about__stats { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.stat-card {
    background: var(--bg-panel); border: 1px solid var(--border-glass); border-radius: 16px;
    padding: 2rem; text-align: center; backdrop-filter: blur(10px); position: relative; overflow: hidden;
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--accent-gradient); opacity: 0.05; transition: opacity 0.3s; }
.stat-card:hover::before { opacity: 0.15; }
.stat-card h3 { font-size: 3rem; background: var(--accent-gradient); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 0.5rem; }
.stat-card p { color: var(--text-secondary); font-weight: 500; }

/* ===================================================================
   SKILLS SECTION
=================================================================== */
.skills__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.skill-panel {
    background: var(--bg-panel); border: 1px solid var(--border-glass); border-radius: 20px;
    padding: 2rem; backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.skill-panel h3 { font-size: 1.3rem; margin-bottom: 1.5rem; color: var(--accent-cyan); display: flex; align-items: center; gap: 0.5rem; }
.skill-panel h3::before { content: '>'; font-family: var(--font-mono); color: var(--accent-purple); }
.skill-chips { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.chip {
    padding: 0.6rem 1.2rem; background: rgba(0, 240, 255, 0.05); border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 30px; font-size: 0.9rem; color: var(--text-primary); transition: var(--transition); cursor: default;
}
.chip:hover { background: rgba(0, 240, 255, 0.15); border-color: var(--accent-cyan); transform: translateY(-3px) scale(1.05); box-shadow: 0 5px 15px rgba(0, 240, 255, 0.2); }

/* ===================================================================
   EXPERIENCE / TIMELINE
=================================================================== */
.timeline { position: relative; max-width: 900px; margin: 0 auto; padding-left: 3rem; }
.timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent-gradient); box-shadow: 0 0 10px var(--accent-cyan); border-radius: 3px; }
.timeline__item {
    position: relative; background: var(--bg-panel); border: 1px solid var(--border-glass); border-radius: 16px;
    padding: 2rem; margin-bottom: 2.5rem; backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.timeline__item::before {
    content: ''; position: absolute; left: -3.65rem; top: 2rem; width: 16px; height: 16px;
    background: var(--bg-dark); border: 3px solid var(--accent-cyan); border-radius: 50%; box-shadow: 0 0 10px var(--accent-cyan);
}
.timeline__date { font-family: var(--font-mono); font-size: 0.9rem; color: var(--accent-purple); margin-bottom: 0.5rem; font-weight: 600; }
.timeline__item h3 { font-size: 1.4rem; margin-bottom: 1rem; color: var(--text-primary); }
.timeline__item ul { list-style: none; padding: 0; }
.timeline__item li { color: var(--text-secondary); margin-bottom: 0.6rem; padding-left: 1.5rem; position: relative; }
.timeline__item li::before { content: '▹'; position: absolute; left: 0; color: var(--accent-cyan); }

/* ===================================================================
   PROJECTS
=================================================================== */
.projects__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.project-card {
    background: var(--bg-panel); border: 1px solid var(--border-glass); border-radius: 20px;
    padding: 2.5rem; backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative; overflow: hidden; transition: var(--transition);
}
.project-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--accent-gradient); opacity: 0; transition: opacity 0.4s; z-index: 0; }
.project-card:hover::before { opacity: 0.05; }
.project-card:hover { border-color: var(--accent-cyan); box-shadow: 0 20px 40px rgba(0, 240, 255, 0.15); }
.project-card > * { position: relative; z-index: 1; }
.project-card__tag { display: inline-block; font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-cyan); background: rgba(0, 240, 255, 0.1); padding: 0.3rem 0.8rem; border-radius: 20px; margin-bottom: 1rem; }
.project-card h3 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--text-primary); }
.project-card p { color: var(--text-secondary); line-height: 1.7; }

/* ===================================================================
   EDUCATION & SOFT SKILLS
=================================================================== */
.edu-soft__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.edu-panel, .soft-panel { background: var(--bg-panel); border: 1px solid var(--border-glass); border-radius: 20px; padding: 2.5rem; backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
.edu-panel h3, .soft-panel h3 { font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--accent-cyan); }
.edu-item { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border-glass); }
.edu-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.edu-item h4 { font-size: 1.1rem; color: var(--text-primary); margin-bottom: 0.3rem; }
.edu-item p { color: var(--text-secondary); font-size: 0.95rem; }
.soft-chips { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ===================================================================
   CONTACT
=================================================================== */
.contact__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; }
.contact__info { background: var(--bg-panel); border: 1px solid var(--border-glass); border-radius: 20px; padding: 2.5rem; backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
.contact__info h3 { font-size: 1.8rem; margin-bottom: 1rem; color: var(--text-primary); }
.contact__info > p { color: var(--text-secondary); margin-bottom: 2rem; }
.contact__details { margin-bottom: 2rem; }
.contact__item { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; color: var(--text-secondary); }
.contact__item .icon { font-size: 1.5rem; }
.contact__socials { display: flex; gap: 1rem; }
.social-btn { padding: 0.8rem 1.5rem; background: rgba(0, 240, 255, 0.1); border: 1px solid var(--accent-cyan); border-radius: 30px; color: var(--accent-cyan); font-weight: 600; transition: var(--transition); }
.social-btn:hover { background: var(--accent-cyan); color: #000; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0, 240, 255, 0.3); }

.contact__form { background: var(--bg-panel); border: 1px solid var(--border-glass); border-radius: 20px; padding: 2.5rem; backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-secondary); font-weight: 500; }
.form-group input, .form-group textarea {
    width: 100%; padding: 1rem; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-glass);
    border-radius: 12px; color: var(--text-primary); font-family: var(--font-main); font-size: 1rem; transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent-cyan); box-shadow: 0 0 15px rgba(0, 240, 255, 0.2); background: rgba(255, 255, 255, 0.05); }
.form-group textarea { resize: vertical; min-height: 120px; }

/* ===================================================================
   FOOTER & ANIMATIONS
=================================================================== */
.footer { text-align: center; padding: 3rem 2rem; border-top: 1px solid var(--border-glass); color: var(--text-secondary); background: rgba(5, 5, 10, 0.8); }

.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ===================================================================
   RESPONSIVE
=================================================================== */
@media (max-width: 1024px) {
    .about__grid, .skills__grid, .projects__grid, .edu-soft__grid, .contact__grid { grid-template-columns: 1fr; }
    .hero__3d-element { display: none; }
}

@media (max-width: 768px) {
    .nav__toggle { display: flex; }
    .nav__links {
        position: fixed; top: 0; right: -100%; width: 70%; height: 100vh;
        background: rgba(5, 5, 10, 0.98); backdrop-filter: blur(20px);
        flex-direction: column; justify-content: center; align-items: center; gap: 2.5rem;
        transition: right 0.4s ease; border-left: 1px solid var(--border-glass);
    }
    .nav__toggle-input:checked ~ .nav__links { right: 0; }
    .nav__toggle-input:checked ~ .nav__toggle span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .nav__toggle-input:checked ~ .nav__toggle span:nth-child(2) { opacity: 0; }
    .nav__toggle-input:checked ~ .nav__toggle span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }
    
    .hero__name { font-size: 3rem; }
    .hero__typing { font-size: 1.2rem; }
    .section { padding: 4rem 0; }
    .section__title { font-size: 2rem; }
    .timeline { padding-left: 2rem; }
    .timeline::before { left: 0; }
    .timeline__item::before { left: -2.65rem; }
}

@media (max-width: 480px) {
    .container { padding: 0 1.2rem; }
    .hero__actions { flex-direction: column; align-items: center; }
    .btn { width: 100%; text-align: center; }
}