/* --- Stats Section --- */
.stats-section {
    background-color: #050505;
    padding: 100px 5%;
    text-align: center;
}

.stats-title {
    font-family: 'Oswald', sans-serif;
    font-size: 4rem;
    color: #333; /* Outline look logic */
    -webkit-text-stroke: 1px white;
    text-transform: uppercase;
    margin-bottom: 60px;
}

.stats-title .highlight-underline {
    color: white;
    -webkit-text-stroke: 0;
    border-bottom: 8px solid var(--primary-orange);
    display: inline-block;
    padding-bottom: 5px;
}

.stats-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-card {
    background-color: #000;
    border: 1px solid #222;
    padding: 40px 20px;
    width: 250px;
    border-radius: 12px;
    transition: transform 0.3s, border-color 0.3s;
}

.stat-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-orange);
}

.stat-number {
    font-family: 'Oswald', sans-serif;
    font-size: 4rem;
    color: var(--primary-orange);
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    font-family: 'Roboto', sans-serif;
    color: #888;
    font-size: 1.1rem;
}

/* --- Portfolio Section --- */
/* --- Portfolio Section --- */
.portfolio-section {
    position: relative;
    background-color: #0d0d0d;
    padding: 100px 5%;
    text-align: center;
    overflow: hidden; /* Contain the floating elements */
    z-index: 1;
}

/* --- Animated Tech Background (Reusing About Logic) --- */
.portfolio-bg-code {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.tech-floater {
    position: absolute;
    color: var(--primary-orange); /* Use variable for visibility */
    font-family: 'Fira Code', monospace;
    font-size: 1.2rem;
    opacity: 0.4; /* Heavier/More visible as requested */
    font-weight: 700; /* Bold for extra visibility */
    user-select: none;
    white-space: nowrap;
    animation: floatBgPort 12s linear infinite; /* Slightly slower for variety */
    top: 100%; /* Start below */
    text-shadow: 0 0 5px rgba(0, 229, 255, 0.3); /* Slight glow */
}

@keyframes floatBgPort {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    20% { opacity: 0.4; }
    80% { opacity: 0.4; }
    100% { transform: translateY(-120vh) rotate(5deg); opacity: 0; }
}

/* Staggered Delays & Positions - Extended for density */
.tf-1 { left: 10%; animation-delay: 0s; font-size: 1.5rem; }
.tf-2 { left: 20%; animation-delay: 5s; font-size: 1.1rem; }
.tf-3 { left: 35%; animation-delay: 2s; font-size: 1.8rem; }
.tf-4 { left: 50%; animation-delay: 9s; font-size: 1.3rem; }
.tf-5 { left: 65%; animation-delay: 1s; font-size: 2rem; }
.tf-6 { left: 80%; animation-delay: 7s; font-size: 1.4rem; }
.tf-7 { left: 90%; animation-delay: 3s; font-size: 1.2rem; }
.tf-8 { left: 5%;  animation-delay: 6s; font-size: 1.6rem; }
.tf-9 { left: 15%; animation-delay: 2.5s; font-size: 1.3rem; }
.tf-10 { left: 30%; animation-delay: 7.5s; font-size: 1.9rem; }
.tf-11 { left: 45%; animation-delay: 1.5s; font-size: 1.1rem; }
.tf-12 { left: 60%; animation-delay: 5.5s; font-size: 1.7rem; }
.tf-13 { left: 75%; animation-delay: 3.5s; font-size: 1.4rem; }
.tf-14 { left: 85%; animation-delay: 8.5s; font-size: 2.1rem; }
.tf-15 { left: 95%; animation-delay: 0.5s; font-size: 1.2rem; }

/* Even More Density (tf-16 to tf-30) */
.tf-16 { left: 2%;  animation-delay: 1.2s; font-size: 1.4rem; }
.tf-17 { left: 12%; animation-delay: 6.8s; font-size: 1.8rem; }
.tf-18 { left: 22%; animation-delay: 3.5s; font-size: 1.0rem; }
.tf-19 { left: 32%; animation-delay: 9.1s; font-size: 2.0rem; }
.tf-20 { left: 42%; animation-delay: 2.3s; font-size: 1.3rem; }
.tf-21 { left: 52%; animation-delay: 7.7s; font-size: 1.6rem; }
.tf-22 { left: 62%; animation-delay: 4.4s; font-size: 1.9rem; }
.tf-23 { left: 72%; animation-delay: 0.9s; font-size: 1.2rem; }
.tf-24 { left: 82%; animation-delay: 5.6s; font-size: 1.7rem; }
.tf-25 { left: 92%; animation-delay: 8.2s; font-size: 1.5rem; }
.tf-26 { left: 7%;  animation-delay: 3.1s; font-size: 1.1rem; }
.tf-27 { left: 27%; animation-delay: 5.2s; font-size: 2.1rem; }
.tf-28 { left: 47%; animation-delay: 1.8s; font-size: 1.4rem; }
.tf-29 { left: 67%; animation-delay: 7.3s; font-size: 1.6rem; }
.tf-30 { left: 87%; animation-delay: 4.1s; font-size: 1.3rem; }

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.browser-window {
    background: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #333;
    height: 300px; /* Fixed height */
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

.browser-window:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 229, 255, 0.15);
    border-color: var(--primary-orange);
}

/* --- Interactive Header --- */
.browser-header {
    background: #2d2d2d;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #333;
    z-index: 10;
    position: relative;
    transition: background 0.3s;
}

.browser-window:hover .browser-header {
    background: #00e5ff; /* Cyan pop on hover */
}

.browser-header .dots {
    display: flex;
    gap: 6px;
    margin-right: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

/* URL Bar / Tech Stack Switcher */
.header-info {
    flex-grow: 1;
    text-align: left;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #ccc;
    position: relative;
    height: 20px;
    overflow: hidden;
}

.project-name {
    display: block;
    transition: transform 0.3s ease;
}

.tech-stack {
    display: block;
    position: absolute;
    top: 100%; /* Hidden below */
    left: 0;
    color: #000; /* Black text on Cyan header */
    font-weight: 700;
    transition: top 0.3s ease;
}

/* On card hover, header turns Cyan, so text should be darker/visible */
.browser-window:hover .header-info {
    color: #000;
}

.browser-window:hover .project-name {
    transform: translateY(-150%);
}

.browser-window:hover .tech-stack {
    top: 0;
}


/* --- Image & Overlay Content --- */
.project-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #111;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
    opacity: 0.8;
}

.browser-window:hover .project-img {
    filter: blur(4px) brightness(0.4);
    transform: scale(1.05);
}

/* Try Now Button Overlay */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.browser-window:hover .overlay {
    opacity: 1;
}

.try-btn {
    padding: 12px 30px;
    background: transparent;
    border: 2px solid var(--primary-orange);
    color: var(--primary-orange);
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.try-btn:hover {
    background: var(--primary-orange);
    color: #000;
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.8);
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 1000px) {
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .portfolio-grid { grid-template-columns: 1fr; }
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.url-bar {
    background: #000;
    color: #aaa;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    padding: 2px 10px;
    border-radius: 4px;
    margin-left: 10px;
    flex-grow: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.browser-content {
    flex-grow: 1;
    background-color: #111;
    position: relative;
    /* Generic Code Pattern Background */
    background-image: 
        linear-gradient(#222 1px, transparent 1px),
        linear-gradient(90deg, #222 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: center center;
}

/* Pseudo-screenshot content */
.browser-content::after {
    content: "function init() { ... }";
    color: #444;
    font-family: 'Fira Code', monospace;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
}

/* Custom "Code" for each project */
.p1::after { content: "<Dashboard data={ai} />"; color: var(--primary-orange); }
.p2::after { content: "import crypto from 'web3'"; color: #98c379; }
.p3::after { content: "res.status(200).json(order)"; color: #61afef; }
.p4::after { content: "class User < ApplicationRecord"; color: #e06c75; }
.p5::after { content: "Widget build(context) { ... }"; color: #56b6c2; }
.p6::after { content: "ggplot(data, aes(x=time))"; color: #c678dd; }


/* Responsive */
@media (max-width: 992px) {
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-title { font-size: 3rem; }
}
@media (max-width: 600px) {
    .portfolio-grid { grid-template-columns: 1fr; }
    .stats-grid { flex-direction: column; align-items: center; }
}
