/* 
   Faiq Portfolio - Premium Techy Style
   Vanilla CSS Implementation
*/

/* CSS Custom Properties (Variables) */
:root {
    --bg-base: #050508;
    --bg-surface: #0a0a10;
    --bg-panel: rgba(16, 16, 28, 0.6);

    --text-main: #e2e8f0;
    --text-muted: #8892b0;
    --text-light: #ccd6f6;

    --primary: #00f3ff;
    --primary-glow: rgba(0, 243, 255, 0.4);
    --secondary: #b026ff;
    --secondary-glow: rgba(176, 38, 255, 0.4);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-mono: 'Fira Code', monospace;

    --border-glass: rgba(255, 255, 255, 0.08);
    --transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* Reset & Scaffolding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Hide default cursor for custom cursor */
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-base);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background-color: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary);
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--primary-glow);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Background Effects */
#tech-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    opacity: 0.3;
}

.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
    animation: float 20s infinite alternate;
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--primary);
}

.orb-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--secondary);
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(100px, 50px);
    }
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 120px 0;
}

.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.highlight {
    color: var(--primary);
}

.mt-4 {
    margin-top: 2rem;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-light);
    line-height: 1.2;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: 4px;
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid transparent;
    gap: 0.75rem;
    z-index: 1;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-base);
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 30px var(--primary-glow) inset, 0 0 20px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-icon {
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    border-radius: 50%;
    background: var(--bg-panel);
}

.btn-icon:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--primary-glow);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 90px;
    z-index: 100;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    height: 70px;
    background: rgba(5, 5, 8, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: -0.5px;
}

.cursor-blink {
    animation: blink 1s step-end infinite;
    color: var(--primary);
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--primary);
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    width: 100%;
}

.section-header.justify-center {
    justify-content: center;
}

.section-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.title-num {
    font-family: var(--font-mono);
    color: var(--primary);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-right: 15px;
    font-weight: 400;
}

.title-line {
    height: 1px;
    flex-grow: 1;
    background: var(--border-glass);
    margin-left: 20px;
    position: relative;
}

.title-line::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.left-line {
    margin-left: 0;
    margin-right: 20px;
}

.left-line::after {
    left: auto;
    right: 0;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 90px;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.greeting {
    font-family: var(--font-mono);
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1rem;
}

.hero-title {
    font-size: clamp(3.5rem, 8vw, 5.5rem);
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-light);
    line-height: 1.1;
}

.role {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--text-muted);
    margin-bottom: 25px;
    font-weight: 600;
    line-height: 1.2;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 540px;
    margin-bottom: 40px;
}

.hero-cta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Code Editor Window */
.code-editor {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    border: 1px solid var(--border-glass);
}

.code-editor::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 40px rgba(0, 243, 255, 0.05);
    pointer-events: none;
}

.editor-header {
    background: #111119;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
}

.mac-btns {
    display: flex;
    gap: 8px;
    margin-right: 20px;
}

.mac-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.close {
    background: #ff5f56;
}

.minimize {
    background: #ffbd2e;
}

.expand {
    background: #27c93f;
}

.editor-tab {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-surface);
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid var(--border-glass);
}

.editor-body {
    padding: 25px;
    background: #0d0d14;
    overflow-x: auto;
}

.editor-body pre {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    color: #e2e8f0;
}

.keyword {
    color: #ff7b72;
}

.class-name {
    color: #79c0ff;
}

.string {
    color: #a5d6ff;
}

.property {
    color: #d2a8ff;
}

.method {
    color: #d2a8ff;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 5rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    color: var(--text-muted);
}

.about-text strong {
    color: var(--primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 40px;
}

.stat-card {
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-glow);
    background: rgba(0, 243, 255, 0.05);
}

.stat-num {
    font-size: 2.5rem;
    font-family: var(--font-mono);
    color: var(--text-light);
    margin-bottom: 5px;
    display: inline-block;
}

.stat-plus {
    font-size: 2.5rem;
    font-family: var(--font-mono);
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.image-wrapper {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.image-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    z-index: 2;
    aspect-ratio: 4/5;
    transition: var(--transition);
}

.image-wrapper:hover .image-container {
    transform: translate(-10px, -10px);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1) brightness(0.8);
    transition: var(--transition);
}

.image-wrapper:hover .profile-img {
    filter: none;
}

.tech-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 12px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
    border: 1px solid var(--primary-glow);
}

.frame-border {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 12px;
    z-index: 1;
    transition: var(--transition);
}

.image-wrapper:hover .frame-border {
    transform: translate(10px, 10px);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.skill-card {
    padding: 20px;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 243, 255, 0.3);
}

.skill-content {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.skill-icon {
    width: 40px;
    height: 40px;
    background: rgba(0, 243, 255, 0.1);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    font-size: 1.2rem;
}

.skill-name {
    font-weight: 600;
    font-size: 1.05rem;
}

.skill-progress-bar {
    height: 4px;
    background: var(--bg-base);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    position: relative;
}

/* Projects Section */
.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin: -1.5rem auto 3rem;
    max-width: 600px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7);
    border-color: var(--primary-glow);
}

.project-img-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 16, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.folder-icon {
    font-size: 2rem;
    color: var(--primary);
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-links a {
    color: var(--text-light);
    font-size: 1.2rem;
}

.project-links a:hover {
    color: var(--primary);
}

.project-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.project-title a {
    color: var(--text-light);
}

.project-title a:hover {
    color: var(--primary);
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin-top: auto;
}

.project-tech-list li {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 4px;
}

/* Footer Section */
.footer {
    padding: 100px 0 50px;
    text-align: center;
    position: relative;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
}

.contact-sup {
    font-family: var(--font-mono);
    color: var(--primary);
    margin-bottom: 15px;
}

.footer-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 20px;
}

.footer-text {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.social-links-footer {
    display: flex;
    gap: 20px;
    margin: 50px 0;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-panel);
    border: 1px solid var(--border-glass);
    color: var(--text-light);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icon:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.footer-bottom {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.tech-stack-info {
    margin-top: 5px;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Reveal Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease-out;
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease-out;
}

.reveal-up.active,
.reveal-left.active,
.reveal-right.active {
    opacity: 1;
    transform: translate(0, 0);
}

/* Glitch Effect */
.glitch-wrapper {
    position: relative;
    display: inline-block;
}

.glitch-wrapper::before,
.glitch-wrapper::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch-wrapper::before {
    left: 2px;
    text-shadow: -2px 0 red;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-wrapper::after {
    left: -2px;
    text-shadow: -2px 0 blue;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(72px, 9999px, 83px, 0);
    }

    20% {
        clip: rect(31px, 9999px, 84px, 0);
    }

    40% {
        clip: rect(7px, 9999px, 63px, 0);
    }

    60% {
        clip: rect(100px, 9999px, 56px, 0);
    }

    80% {
        clip: rect(98px, 9999px, 12px, 0);
    }

    100% {
        clip: rect(10px, 9999px, 66px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(59px, 9999px, 19px, 0);
    }

    20% {
        clip: rect(14px, 9999px, 7px, 0);
    }

    40% {
        clip: rect(34px, 9999px, 14px, 0);
    }

    60% {
        clip: rect(98px, 9999px, 32px, 0);
    }

    80% {
        clip: rect(79px, 9999px, 62px, 0);
    }

    100% {
        clip: rect(1px, 9999px, 99px, 0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-visual {
        order: -1;
        margin-bottom: 20px;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--bg-surface);
        flex-direction: column;
        justify-content: center;
        transition: var(--transition);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu-btn {
        display: block;
        z-index: 101;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Hide custom cursor on mobile */
    .cursor-dot,
    .cursor-outline {
        display: none;
    }

    * {
        cursor: auto;
    }
}