/* ===================== Root Variables ===================== */
:root {
    --primary: #00ff88;
    --primary-dark: #00cc6a;
    --secondary: #00ccff;
    --secondary-dark: #0099cc;
    --accent: #ff2a6d;
    --dark: #000000;
    --dark-gray: #1a1a1a;
    --medium-gray: #2a2a2a;
    --light-gray: #a0a0a0;
    --white: #ffffff;
    --glow: 0 0 10px rgba(0, 255, 136, 0.7);
}

/* ===================== Global Reset ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark);
    color: var(--white);
    font-family: 'Exo 2', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background visual layers */
.cyber-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 255, 136, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 204, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 42, 109, 0.03) 0%, transparent 50%);
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    opacity: 0.3;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0; /* Reduced from 20px */
    transition: all 0.4s ease;
    background: transparent;
    backdrop-filter: blur(10px);
}

header.scrolled {
    padding: 10px 0; /* Reduced from 15px */
    background: rgba(10, 10, 10, 0.85);
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
    box-shadow: 0 5px 30px rgba(0, 255, 136, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 2rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: var(--glow);
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    bottom: 5px;
    right: -10px;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
    position: relative;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-links a::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::before {
    width: 100%;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary);
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    padding: 0 30px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.hero-content {
    z-index: 1;
    max-width: 800px;
    width: 100%;
}

.hero h1 {
    font-size: 4rem;
    margin: 0;
    line-height: 1.1;
    font-family: 'Orbitron', sans-serif;
}

.hero h1 .gradient-text {
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

.hero h2 {
    font-size: 1.8rem;
    margin-bottom: 25px; /* Reduced from 30px */
    color: var(--light-gray);
    font-weight: 400;
    position: relative;
    display: inline-block;
    min-height: 60px;
}

.hero h2 .typing-text {
    border-right: 2px solid var(--primary);
    padding-right: 5px;
    animation: blink-caret 1s infinite;
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary); }
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px; /* Reduced from 50px */
    color: var(--light-gray);
    max-width: 1000px;
}

.btn-container {
    margin-top: 25px; /* Reduced from 30px */
}

.resume-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: var(--dark);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
    position: relative;
    overflow: hidden;
}

.resume-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.resume-btn:hover::before {
    left: 100%;
}

.resume-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.5);
}

/* Section Styling */
section {
    padding: 70px 0; /* Reduced from 80px */
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 50px; /* Reduced from 60px */
    position: relative;
    padding: 0 20px;
}

.section-title h2 {
    font-size: 2.8rem;
    display: inline-block;
    position: relative;
    font-family: 'Orbitron', sans-serif;
}

.section-title h2::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    bottom: -12px; /* Reduced from -15px */
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.section-title p {
    max-width: 600px;
    margin: 15px auto 0; /* Reduced from 20px */
    color: var(--light-gray);
    font-size: 1.1rem;
}

/* About Section */
#about {
    padding: 70px 0; /* Reduced from 80px */
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px; /* Reduced from 60px */
    align-items: flex-start;
    padding: 0 20px;
    margin-top: 0;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 20px; /* Reduced from 25px */
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.about-text h3::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    animation: expandWidth 2s forwards;
    animation-delay: 1s;
}

@keyframes expandWidth {
    to {
        width: 100%;
    }
}

.about-text p {
    margin-bottom: 20px; /* Reduced from 25px */
    color: var(--light-gray);
    font-size: 1.1rem;
    line-height: 1.7;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px; /* Reduced from 15px */
    margin-top: 25px; /* Reduced from 30px */
}

.skill-tag {
    background: rgba(0, 255, 136, 0.1);
    color: var(--primary);
    padding: 8px 18px; /* Reduced from 10px 20px */
    border-radius: 30px;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 255, 136, 0.3);
    transition: all 0.3s ease;
    cursor: default;
}

.skill-tag:hover {
    background: rgba(0, 255, 136, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.2);
}

/* Terminal Section */
.terminal-section {
    margin-top: 50px; /* Reduced from 60px */
    padding: 0 20px;
}

.terminal-container {
    max-width: 100%;
    margin: 0 auto;
}

.code-terminal {
    background: var(--dark-gray);
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    height: 430px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.terminal-header {
    background: var(--medium-gray);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-button.close { background: #ff5f57; }
.terminal-button.minimize { background: #ffbd2e; }
.terminal-button.maximize { background: #28ca42; }

.terminal-title {
    margin-left: 10px;
    color: var(--light-gray);
    font-size: 0.9rem;
}

.terminal-content {
    padding: 20px;
    flex-grow: 1;
    font-family: 'Courier New', monospace;
    color: var(--primary);
    overflow-y: auto;
    font-size: 1rem;
    line-height: 1.5;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 136, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 204, 255, 0.03) 0%, transparent 50%);
}

.terminal-line {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    min-height: 20px;
}

.terminal-prompt { color: var(--secondary); margin-right: 10px; }

.terminal-cursor {
    display: inline-block;
    width: 9px;
    height: 18px;
    background: var(--primary);
    margin-left: 5px;
    animation: blink 1s infinite;
}

/* Experience Section */
.timeline {
    position: relative;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
    border-radius: 2px;
}

.timeline-item {
    padding: 20px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.5s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; }

.timeline-content {
    padding: 25px; /* Reduced from 30px */
    background: var(--dark-gray);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
}

.timeline-item:nth-child(odd) .timeline-content {
    border-left: none;
    border-right: 4px solid var(--secondary);
}

.timeline-content:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 255, 136, 0.1);
}

.timeline-content::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background: var(--dark-gray);
    top: 30px;
    transform: rotate(45deg);
    border-right: 1px solid var(--primary);
    border-top: 1px solid var(--primary);
}

.timeline-item:nth-child(odd) .timeline-content::after {
    left: -10px;
    right: auto;
    border-right: none;
    border-top: none;
    border-left: 1px solid var(--secondary);
    border-bottom: 1px solid var(--secondary);
}

.timeline-date {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px; /* Reduced from 10px */
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-item:nth-child(odd) .timeline-date { justify-content: flex-end; }

.timeline-title { font-size: 1.5rem; margin-bottom: 8px; /* Reduced from 10px */ color: var(--white); }

.timeline-company {
    color: var(--secondary);
    margin-bottom: 12px; /* Reduced from 15px */
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-item:nth-child(odd) .timeline-company { justify-content: flex-end; }

.timeline-desc { color: var(--light-gray); font-size: 1rem; }

.timeline-desc li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
}

.timeline-desc li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.timeline-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    top: 30px;
    right: -10px;
    z-index: 1;
    box-shadow: 0 0 0 5px var(--dark), 0 0 10px var(--primary);
}

.timeline-item:nth-child(odd) .timeline-marker {
    right: auto;
    left: -10px;
    background: var(--secondary);
    box-shadow: 0 0 0 5px var(--dark), 0 0 10px var(--secondary);
}

/* ===================== PROJECTS SLIDESHOW ===================== */
#projects {
    padding: 70px 0; /* Reduced from 80px */
    position: relative;
    overflow: hidden;
}

.projects-slider {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.slides-container {
    position: relative;
    height: 550px;
    overflow: hidden;
    border-radius: 15px;
}

.project-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-slide.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 1;
}

.project-slide.prev {
    transform: translateX(-100%);
}

.project-slide.next {
    transform: translateX(100%);
}

.project-card {
    background: var(--dark-gray);
    border-radius: 15px;
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    height: 500px;
    display: flex;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 136, 0.2);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.4);
}

.project-image {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.website-preview {
    width: 100%;
    height: 100%;
    position: relative;
    background: var(--medium-gray);
}

.website-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.website-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .website-overlay {
    opacity: 1;
}

.live-indicator {
    background: rgba(255, 42, 109, 0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.website-preview.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-gray);
}

.placeholder-content {
    text-align: center;
    color: var(--light-gray);
}

.placeholder-content i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.placeholder-content p {
    font-size: 1.1rem;
}

.project-content {
    flex: 1;
    padding: 35px; /* Reduced from 40px */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-content h3 {
    font-size: 2rem;
    margin-bottom: 18px; /* Reduced from 20px */
    color: var(--white);
    font-family: 'Orbitron', sans-serif;
}

.project-content p {
    color: var(--light-gray);
    line-height: 1.6;
    margin-bottom: 25px; /* Reduced from 30px */
    font-size: 1.1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px; /* Reduced from 30px */
}

.tech-tag {
    background: rgba(0, 255, 136, 0.1);
    color: var(--primary);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 255, 136, 0.2);
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: rgba(0, 255, 136, 0.2);
    transform: translateY(-2px);
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: var(--dark);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
    min-height: 44px;
    font-size: 0.95rem;
}

.project-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 255, 136, 0.3);
}

/* Slider Controls */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid rgba(0, 255, 136, 0.3);
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.slider-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

/* Dots Navigation */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px; /* Reduced from 30px */
    position: relative;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--primary);
    transform: scale(1.2);
    box-shadow: 0 0 10px var(--primary);
}

.dot:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.project-counter {
    text-align: center;
    margin-top: 18px; /* Reduced from 20px */
    font-family: 'Orbitron', sans-serif;
    color: var(--primary);
    font-size: 1.2rem;
}

/* ===================== TECHNICAL TOOLS SECTION ===================== */
#tools {
    padding: 70px 0; /* Reduced from 80px */
    position: relative;
    overflow: hidden;
}

/* Desktop: Horizontal Scroll */
.horizontal-scroll-container {
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 300px;
    padding: 30px 0;
}

.horizontal-scroll-content {
    display: flex;
    width: max-content;
    animation: scroll-horizontal 40s linear infinite;
}

.horizontal-scroll-container:hover .horizontal-scroll-content {
    animation-play-state: paused;
}

.tools-grid {
    display: flex;
    gap: 25px;
    padding: 25px;
}

.tool-card {
    flex: 0 0 260px;
    background: var(--dark-gray);
    border-radius: 12px;
    text-align: center;
    padding: 30px 20px;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease, box-shadow 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tool-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.tool-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.3);
}

.tool-card img {
    width: 60px;
    height: 65px;
    margin-bottom: 15px;
    filter: none;
    transition: transform 0.3s ease;
    object-fit: contain;
}

.tool-card:hover img {
    filter: brightness(1) drop-shadow(0 0 10px #00ff88);
    transform: scale(1.1);
}

.tool-card h3 {
    font-size: 1.2rem;
    color: var(--white);
    margin-top: 10px;
    margin-bottom: 0;
}

/* Mobile: Vertical Scroll Container - SINGLE COLUMN (LONGER) */
.vertical-scroll-container {
    display: none;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 750px; /* Increased from 400px */
    padding: 20px 0;
}

.vertical-scroll-content {
    display: flex;
    flex-direction: column;
    height: max-content;
    animation: scroll-vertical 60s linear infinite; /* Increased from 40s */
}

.vertical-scroll-container:hover .vertical-scroll-content {
    animation-play-state: paused;
}

.tools-vertical {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 20px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.tool-item {
    background: var(--dark-gray);
    border-radius: 12px;
    text-align: center;
    padding: 30px 25px;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease, box-shadow 0.4s ease;
    opacity: 0;
    transform: translateY(20px);
    width: 100%;
    height: auto;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.tool-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.tool-item:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.3);
}

.tool-item img {
    width: 70px;
    height: 70px;
    margin-bottom: 15px;
    filter: none;
    transition: transform 0.3s ease;
    object-fit: contain;
}

.tool-item:hover img {
    filter: brightness(1) drop-shadow(0 0 10px #00ff88);
    transform: scale(1.1);
}

.tool-item h3 {
    font-size: 1.1rem;
    color: var(--white);
    margin-top: 8px;
    font-weight: 600;
}

/* Horizontal Animation for Desktop */
@keyframes scroll-horizontal {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Vertical Animation for Mobile */
@keyframes scroll-vertical {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* Certifications Section */
.certifications {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.cert-card {
    background: var(--dark-gray);
    border-radius: 12px;
    color: #fff;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: transform 0.5s ease, box-shadow 0.5s ease, border-color 0.5s ease;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(40px);
}

.cert-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.cert-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.2);
}

.cert-img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.cert-card h3 {
    margin-bottom: 10px;
    font-size: 1.4rem;
    text-align: center;
}

.provider {
    font-size: 0.9rem;
    color: #00ff88;
    margin-bottom: 10px;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background-color: #222;
    margin: auto;
    padding: 20px;
    border-radius: 12px;
    width: 80%;
    max-width: 600px;
    color: #fff;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #fff;
}

/* Contact Section */
#contact {
    padding: 50px 0; /* Reduced from 60px */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.social-icons .icon {
    background: #111;
    color: #fff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.social-icons .icon:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.2);
}

/* Footer */
footer {
    background: var(--dark-gray);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(0, 255, 136, 0.1);
}

.footer-text { color: var(--light-gray); font-size: 1rem; }

/* Particle Animation */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
    animation: particle-float 15s infinite linear;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* ===================== RESPONSIVE DESIGN ===================== */

/* Large Tablets and Below */
@media (max-width: 1200px) {
    .certifications {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .project-card {
        height: 450px;
    }
    
    .slides-container {
        height: 500px;
    }
}

/* Medium Devices */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero h2 {
        font-size: 1.6rem;
        min-height: 55px;
    }
    
    .section-title h2 {
        font-size: 2.4rem;
    }
    
    .project-card {
        flex-direction: column;
        height: auto;
        max-width: 600px;
    }
    
    .project-image {
        height: 300px;
    }
    
    .slides-container {
        height: 650px;
    }
    
    .project-content {
        padding: 30px;
    }
    
    /* Section Styling */
    section {
        padding: 60px 0; /* Reduced from 70px */
    }
    
    .section-title {
        margin-bottom: 40px; /* Reduced from 50px */
    }
    
    /* About Section */
    #about {
        padding: 60px 0; /* Reduced from 70px */
    }
    
    /* ===================== PROJECTS SLIDESHOW ===================== */
    #projects {
        padding: 60px 0; /* Reduced from 70px */
    }
    
    /* ===================== TECHNICAL TOOLS SECTION ===================== */
    #tools {
        padding: 60px 0; /* Reduced from 70px */
    }
    
    /* Contact Section */
    #contact {
        padding: 40px 0; /* Reduced from 50px */
    }
}

/* Tablets & Large Mobiles - MOBILE CENTERED & TOOLS VERTICAL */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(10, 10, 10, 0.95);
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        transition: all 0.4s ease-in-out;
        backdrop-filter: blur(8px);
        z-index: 999;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 18px 0;
    }
    
    /* HERO SECTION CENTERED */
    .hero {
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 0 20px;
        height: 100vh;
    }
    
    .hero-content {
        width: 100%;
        max-width: 100%;
        padding: 20px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
        line-height: 1.2;
        text-align: center;
        margin: 0 auto 15px;
    }
    
    .hero h2 {
        font-size: 1.3rem;
        min-height: 45px;
        text-align: center;
        margin: 0 auto 20px;
    }
    
    .hero p {
        font-size: 1rem;
        line-height: 1.6rem;
        text-align: center;
        margin: 0 auto 30px;
        max-width: 100%;
    }
    
    .btn-container {
        display: flex;
        justify-content: center;
        margin-top: 20px;
    }
    
    /* ABOUT SECTION CENTERED */
    .about-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 20px;
        gap: 30px;
    }
    
    .about-text {
        width: 100%;
        max-width: 100%;
        text-align: center;
    }
    
    .about-text h3 {
        font-size: 1.6rem;
        text-align: center;
        margin: 0 auto 20px;
    }
    
    .about-text p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        text-align: center;
        margin: 0 auto 20px;
        max-width: 100%;
    }
    
    .skills {
        justify-content: center;
        gap: 10px;
        margin-top: 20px;
    }
    
    .skill-tag {
        padding: 8px 16px;
        font-size: 0.85rem;
        text-align: center;
    }
    
    /* TERMINAL CENTERED */
    .terminal-section {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        margin-top: 40px;
        padding: 0 20px;
    }
    
    .terminal-container {
        width: 100%;
        max-width: 100%;
    }
    
    .code-terminal {
        height: 350px;
        font-size: 0.9rem;
        width: 100%;
    }
    
    .terminal-content {
        font-size: 0.9rem;
        padding: 15px;
        text-align: left;
    }
    
    .terminal-header {
        padding: 12px 15px;
    }
    
    /* SECTION TITLES CENTERED */
    .section-title {
        margin-bottom: 40px;
        padding: 0 20px;
        text-align: center;
    }
    
    .section-title h2 {
        font-size: 2.2rem;
        text-align: center;
    }
    
    .section-title p {
        text-align: center;
        margin: 15px auto 0;
    }
    
    /* TIMELINE CENTERED */
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        padding: 20px 20px 20px 70px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-content {
        text-align: left;
    }
    
    .timeline-item:nth-child(odd) {
        text-align: left;
    }
    
    .timeline-item:nth-child(odd) .timeline-date,
    .timeline-item:nth-child(odd) .timeline-company {
        justify-content: flex-start;
    }
    
    .timeline-item:nth-child(odd) .timeline-content {
        border-right: none;
        border-left: 4px solid var(--primary);
    }
    
    .timeline-marker {
        left: 18px !important;
    }
    
    /* PROJECTS SLIDER CENTERED & BUTTONS FIXED */
    .projects-slider {
        padding: 0 20px;
    }
    
    .slides-container {
        height: 600px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .project-card {
        max-width: 100%;
        margin: 0;
        flex-direction: column;
    }
    
    .project-content {
        text-align: center;
        padding: 25px 20px;
        width: 100%;
    }
    
    .project-content h3 {
        font-size: 1.6rem;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .project-content p {
        font-size: 1rem;
        text-align: center;
        margin-bottom: 20px;
        line-height: 1.5;
    }
    
    .project-tech {
        justify-content: center;
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .tech-tag {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    /* PROJECT BUTTONS FIXED - MOBILE */
    .project-links {
        justify-content: center;
        gap: 12px;
        flex-direction: column;
        width: 100%;
    }
    
    .project-link {
        padding: 14px 20px;
        font-size: 1rem;
        min-height: 48px;
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* TOOLS SECTION - VERTICAL SCROLLING FOR MOBILE - LONGER CONTAINER */
    .horizontal-scroll-container {
        display: none;
    }
    
    .vertical-scroll-container {
        display: block;
        height: 600px; /* Increased for mobile */
    }
    
    /* Desktop horizontal tools hidden on mobile */
    .tools-grid {
        display: none;
    }
    
    .tools-vertical {
        display: flex;
        flex-direction: column;
        max-width: 300px;
        gap: 25px;
    }
    
    .tool-item {
        width: 100%;
        min-height: 180px;
    }
    
    /* CERTIFICATIONS CENTERED */
    .certifications {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 20px;
    }
    
    .cert-card {
        text-align: center;
        max-width: 400px;
        margin: 0 auto;
    }
    
    /* CONTACT SECTION CENTERED */
    #contact {
        padding: 40px 20px;
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
        gap: 20px;
    }
    
    .social-icons .icon {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    /* Section Styling */
    section {
        padding: 50px 0; /* Reduced from 60px */
    }
    
    .section-title {
        margin-bottom: 35px; /* Reduced from 40px */
    }
    
    /* About Section */
    #about {
        padding: 50px 0; /* Reduced from 60px */
    }
    
    /* ===================== PROJECTS SLIDESHOW ===================== */
    #projects {
        padding: 50px 0; /* Reduced from 60px */
    }
    
    /* ===================== TECHNICAL TOOLS SECTION ===================== */
    #tools {
        padding: 50px 0; /* Reduced from 60px */
    }
    
    /* Contact Section */
    #contact {
        padding: 35px 20px; /* Reduced from 40px */
    }
}

/* Small Devices - MOBILE CENTERED */
@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
        line-height: 1.3;
        text-align: center;
    }
    
    .hero h2 {
        font-size: 1.1rem;
        min-height: 40px;
        text-align: center;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
        text-align: center;
    }
    
    /* ABOUT TEXT CENTERED */
    .about-text p {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        text-align: center;
    }
    
    .about-content {
        padding: 0 15px;
        gap: 20px;
    }
    
    .skills {
        gap: 8px;
    }
    
    .skill-tag {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    /* TERMINAL CENTERED */
    .code-terminal {
        height: 300px;
    }
    
    .terminal-content {
        font-size: 0.85rem;
        padding: 12px;
    }
    
    /* PROJECTS SLIDER CENTERED - SMALL MOBILE */
    .slides-container {
        height: 550px;
    }
    
    .project-card {
        max-width: 100%;
    }
    
    .project-image {
        height: 220px;
    }
    
    .project-content {
        padding: 20px 15px;
        text-align: center;
    }
    
    .project-content h3 {
        font-size: 1.4rem;
        text-align: center;
        margin-bottom: 12px;
    }
    
    .project-content p {
        font-size: 0.9rem;
        text-align: center;
        margin-bottom: 18px;
    }
    
    .project-tech {
        justify-content: center;
        gap: 6px;
        margin-bottom: 18px;
    }
    
    .tech-tag {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    /* PROJECT BUTTONS - SMALL MOBILE */
    .project-links {
        gap: 10px;
        flex-direction: column;
    }
    
    .project-link {
        padding: 12px 18px;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    /* TOOLS VERTICAL - SMALL MOBILE - LONGER CONTAINER */
    .vertical-scroll-container {
        height: 550px; /* Still longer than before */
    }
    
    .tools-vertical {
        gap: 20px;
        max-width: 280px;
    }
    
    .tool-item {
        width: 100%;
        min-height: 170px;
        padding: 25px 20px;
    }
    
    .tool-item img {
        width: 65px;
        height: 65px;
        margin-bottom: 12px;
    }
    
    .tool-item h3 {
        font-size: 1rem;
    }
    
    /* CONTACT CENTERED */
    .social-icons .icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    /* Section Styling */
    section {
        padding: 40px 0; /* Reduced from 50px */
    }
    
    .section-title {
        margin-bottom: 30px; /* Reduced from 35px */
    }
    
    /* About Section */
    #about {
        padding: 50px 0; /* Reduced from 50px */
    }
    
    /* ===================== PROJECTS SLIDESHOW ===================== */
    #projects {
        padding: 40px 0; /* Reduced from 50px */
    }
    
    /* ===================== TECHNICAL TOOLS SECTION ===================== */
    #tools {
        padding: 40px 0; /* Reduced from 50px */
    }
    
    /* Contact Section */
    #contact {
        padding: 30px 15px; /* Reduced from 35px */
    }
}

/* Very Small Devices */
@media (max-width: 400px) {
    .project-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .project-link {
        width: 100%;
        max-width: none;
        padding: 12px;
        font-size: 0.85rem;
    }
    
    /* TOOLS - VERY SMALL MOBILE */
    .tools-vertical {
        max-width: 250px;
        gap: 15px;
    }
    
    .tool-item {
        min-height: 160px;
        padding: 22px 15px;
    }
    
    .tool-item img {
        width: 60px;
        height: 60px;
    }
    
    .tool-item h3 {
        font-size: 0.95rem;
    }
}

/* Desktop: Show horizontal tools, hide vertical */
@media (min-width: 769px) {
    .horizontal-scroll-container {
        display: block;
    }
    
    .vertical-scroll-container {
        display: none;
    }
    
    .tools-grid {
        display: flex;
    }
    
    .tools-vertical {
        display: none;
    }
}

/* Hide Scroll Icon Animation */
.scroll-indicator,
.scroll-down,
.mouse,
.scroll-icon,
.scroll-arrow {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}