/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

:root {
    --bg-color: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.08);
    /* Slightly more transparent */
    --nav-blur: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

canvas#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
    min-height: 70vh;
    /* Reduced slightly */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Navigation - Capsule */
header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: auto;
    transition: all 0.3s ease;
}

nav {
    background: var(--nav-bg);
    backdrop-filter: blur(var(--nav-blur));
    -webkit-backdrop-filter: blur(var(--nav-blur));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    padding: 12px 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
    color: var(--text-primary);
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #aaa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
}

p {
    color: var(--text-secondary);
    max-width: 600px;
    font-size: 1.1rem;
}

/* Hero Section */
.hero-content {
    animation: fadeIn 1s ease-out;
}

.role {
    display: block;
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 16px;
    transition: transform 0.1s ease;
    /* Faster for tilt */
    display: flex;
    flex-direction: column;
    position: relative;
    /* For scanline */
    overflow: hidden;
    /* Contain scanline */
}

/* Scanline Effect */
.project-card::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: top 0.5s ease;
    z-index: 1;
    pointer-events: none;
}

.project-card:hover::after {
    top: 100%;
    transition: top 0.6s ease-in-out;
}

.project-card:hover {
    /* Transform handled by JS */
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px -10px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.project-card.coming-soon {
    border: 1px dashed rgba(255, 255, 255, 0.1);
    background: transparent;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.project-card.coming-soon h3 {
    margin-bottom: 5px;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.project-card.coming-soon p {
    font-size: 0.9rem;
    flex-grow: 0;
}

.project-card h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.project-card p {
    font-size: 0.95rem;
    flex-grow: 1;
    /* Push buttons to bottom */
}

.tags {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
}

.card-actions {
    display: flex;
    gap: 15px;
    margin-top: auto;
    /* Pushes to bottom */
    flex-wrap: wrap;
}

.btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.btn-sm:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

/* Android Card Extras */
.platform-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(61, 220, 132, 0.15);
    color: #3ddc84;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(61, 220, 132, 0.3);
    letter-spacing: 1px;
}

.android-card {
    position: relative;
}

.btn-download {
    background: rgba(61, 220, 132, 0.15) !important;
    border-color: #3ddc84 !important;
    color: #3ddc84 !important;
}

.btn-download:hover {
    background: rgba(61, 220, 132, 0.3) !important;
    box-shadow: 0 0 15px rgba(61, 220, 132, 0.2);
}

/* Contact */
.contact-links {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--text-primary);
    color: var(--bg-color);
    text-decoration: none;
    border-radius: 50px;
    /* Pillow shape */
    font-weight: 600;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-primary);
}

/* Footer - System Specs Grid */
.specs-footer {
    padding: 40px 0 20px 0;
    margin-top: 80px;
    background: #050505;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Courier New', monospace;
}

.specs-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding: 0 20px;
    margin-bottom: 30px;
}

.spec-col h4 {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 15px;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

.spec-row {
    font-size: 0.85rem;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    color: #a0a0a0;
}

.spec-row span:first-child {
    opacity: 0.7;
}

.spec-row span:last-child {
    color: var(--accent-color);
    text-align: right;
    font-weight: 600;
}

#pwr-val {
    color: #00ff88;
}

#loc-val {
    color: #00ccff;
}

#cpu-val,
#ram-val,
#gpu-val {
    color: #ffbd2e;
}

.copyright-mini {
    text-align: center;
    color: #444;
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .specs-container {
        grid-template-columns: 1fr 1fr;
        /* 2x2 on mobile */
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation Classes */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.show {
    opacity: 1;
    transform: translateY(0);
}

/* Typing Effect Cursor */
.typing-cursor::after {
    content: '|';
    animation: blink 1s step-start infinite;
    color: var(--accent-color);
    margin-left: 2px;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {

    /* Scaling Typography */
    h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2rem;
    }

    /* Nav Adjustments for Mobile */
    header {
        top: 15px;
        width: 90%;
        /* Wider on mobile */
    }

    nav {
        padding: 10px 20px;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    nav ul {
        gap: 20px;
        width: 100%;
        justify-content: space-around;
    }

    nav a {
        font-size: 0.85rem;
    }

    section {
        padding: 60px 0;
    }

    .projects-grid {
        gap: 20px;
    }

    .contact-links {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Interactive Section Utilities */
/* Interactive Section Utilities */
.relative-container {
    position: relative;
    overflow: hidden;
}

/* Skills Section: Hexagon Cyber Grid */
#skills {
    background: #050505;
    /* Deep dark background */
    z-index: 1;
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.content-overlay {
    width: 100%;
    max-width: 1000px;
    padding: 20px;
    z-index: 2;
}

/* Honeycomb Grid Layout */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    /* Gap between hexagons */
    margin-top: 50px;
    padding-bottom: 50px;
}

.skill-card {
    position: relative;
    width: 120px;
    height: 138px;
    /* 120 * 1.1547 for true hexagon */
    background: rgba(255, 255, 255, 0.03);
    margin: 5px;
    /* Hexagon Shape */
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    /* Border hack using inset shadow or background */
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    /* Inner shadow for depth */
}

/* Create the "Border" using a pseudo-element behind (if needed) or just background manipulation. 
   With clip-path, standard borders get cut off. 
   We will use a before element for the glowing border effect. */
.skill-card::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: #0a0a0a;
    /* Match Section BG to create "hollow" look or just dark card bg */
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    z-index: -1;
}

/* Initial State styling */
.skill-card i {
    font-size: 2.5rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    z-index: 1;
}

.skill-card span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 5px;
    font-weight: 500;
    opacity: 0.7;
    z-index: 1;
    transition: all 0.3s ease;
}

/* HOVER EFFECTS: Digital Pulse */
.skill-card:hover {
    background: var(--accent-color);
    /* Flash white/accent */
    transform: translateY(-5px) scale(1.05);
    z-index: 10;
}

/* The "Glow" */
.skill-card:hover::before {
    background: rgba(20, 20, 20, 0.95);
    /* Darken center again */
}

/* Neon Text & Icon */
.skill-card:hover i {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.skill-card:hover span {
    color: #fff;
    opacity: 1;
}

/* Mobile Optimization for Honeycomb */
@media (max-width: 768px) {
    .skills-grid {
        gap: 5px;
    }

    .skill-card {
        width: 90px;
        height: 104px;
    }

    .skill-card i {
        font-size: 2rem;
    }

    .skill-card span {
        font-size: 0.7rem;
    }
}

/* About Section Enhancements */
#about h1 {
    font-family: 'Courier New', monospace;
    cursor: pointer;
}

.project-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background-color: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
    align-self: flex-start;
    margin-bottom: 10px;
}
