:root {
    --primary: #0276e2;
    --primary-dark: #034479;
    --dark: #1e293b;
    --light: #f8fafc;
    --accent: #f59e0b;
    --success: #10b981;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary: #60a5fa;
    --primary-dark: #1e40af;
    --dark: #f8fafc;
    --light: #1e293b;
    --accent: #fbbf24;
    --success: #34d399;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Header */
header {
    background: linear-gradient(135deg, var(--dark), var(--primary-dark));
    color: white;
    padding: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--accent);
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2rem;
}

.badge {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Navigation */
nav {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--primary);
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

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

/* Hamburger menu for mobile */
.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary);
}

/* Sections */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title h2 {
    font-size: 2rem;
    display: inline-block;
    background-color: var(--light);
    padding: 0 20px;
    position: relative;
    z-index: 1;
    color: var(--primary);
}

.section-title::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #ddd;
    z-index: 0;
}

/* About */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.highlight {
    color: var(--primary);
    font-weight: 500;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.skill-category {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
    margin-bottom: 1rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill-list {
    list-style-type: none;
}

.skill-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill-list li i {
    color: var(--primary);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 1px solid #e2e8f0;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.project-img {
    height: 200px;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    position: relative;
}

.project-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-info p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tag {
    background-color: #e2e8f0;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Goals */
.goals-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.goal-card {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: var(--transition);
}

.goal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.goal-icon {
    font-size: 1.5rem;
    color: var(--primary);
    margin-top: 3px;
}

.goal-content h3 {
    margin-bottom: 0.5rem;
}

.goal-content p {
    font-size: 0.95rem;
    color: #64748b;
}

/* Contact */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.contact-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.contact-info h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: #e0e7ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-text h4 {
    margin-bottom: 0.2rem;
}

.contact-text p {
    font-size: 0.95rem;
    color: #64748b;
}

.contact-form {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.contact-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    padding: 3rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3 {
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.footer-links {
    list-style-type: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #e2e8f0;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Terminal styles */
.terminal {
    background: #1e293b;
    border-radius: 8px;
    color: #f8fafc;
    font-family: 'Courier New', monospace;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.terminal:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.terminal-header {
    background: #334155;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.buttons {
    display: flex;
    gap: 8px;
}

.buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.red {
    background: #ef4444;
}

.yellow {
    background: #f59e0b;
}

.green {
    background: #10b981;
}

.title {
    margin-left: 15px;
    font-size: 12px;
    color: #94a3b8;
}

.terminal-body {
    padding: 15px;
    min-height: 150px;
    text-align: left;
    overflow-y: auto;
    max-height: 300px;
}

.terminal-body p {
    margin: 5px 0;
    font-size: 14px;
    line-height: 1.5;
}

.line {
    opacity: 0;
    animation: appearDisappear 5s ease-in-out infinite;
    color: #00ff99;

}

.line:nth-child(1) {
    animation-delay: 0.5s;
}

.line:nth-child(2) {
    animation-delay: 1s;
}

.line:nth-child(3) {
    animation-delay: 1.5s;
}

.line:nth-child(4) {
    animation-delay: 2s;
}

.line:nth-child(5) {
    animation-delay: 2.5s;
}

.line:nth-child(6) {
    animation-delay: 3s;
}

.line:nth-child(7) {
    animation-delay: 3.5s;
}

.line:nth-child(8) {
    animation-delay: 4s;
}



@keyframes appearDisappear {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    85% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}



.cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background-color: #00ff99;
    animation: blink 1s infinite;
    vertical-align: middle;
    margin-left: 2px;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}



/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 90px;
    right: 30px;
    z-index: 9998;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #e67e22;
    transform: translateY(-3px);
}

/* Dark mode styles */

/* Responsive Design */
@media (max-width: 992px) {
    .container {
        padding: 0 15px;
    }

    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .terminal {
        order: -1;
        /* Move terminal to top on mobile */
    }

    .skills-container,
    .projects-grid,
    .goals-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    header {
        padding: 2rem 0;
    }

    h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    section {
        padding: 3rem 0;
    }

    .section-title h2 {
        font-size: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .dark-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        bottom: 20px;
        right: 20px;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        bottom: 70px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .profile-img {
        width: 120px;
        height: 120px;
    }

    .badges {
        flex-direction: column;
        align-items: center;
    }

    .skill-category,
    .goal-card {
        padding: 1rem;
    }

    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .terminal-body {
        padding: 10px;
        font-size: 12px;
    }

    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}

/* Web3 */
/* Web3 Section Styles */
#web3 {
    background-color: var(--lighter);
    position: relative;
    overflow: hidden;
}

#web3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.web3-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.web3-text {
    padding: 1.5rem;
}

.web3-text h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.web3-text h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50%;
    height: 3px;
    background: linear-gradient(to right, var(--primary), transparent);
}

.web3-text p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--dark);
}

.web3-text ul {
    margin-bottom: 2rem;
    list-style-type: none;
}

.web3-text ul li {
    margin-bottom: 0.75rem;
    padding-left: 1.75rem;
    position: relative;
    line-height: 1.6;
    font-size: 0.95rem;
}

.web3-text ul li::before {
    content: '▹';
    position: absolute;
    left: 0.5rem;
    color: var(--primary);
    font-weight: bold;
}

.web3-projects {
    margin-top: 2.5rem;
}

.web3-project {
    background-color: rgba(37, 99, 235, 0.05);
    border-radius: var(--rounded-lg);
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--primary);
    transition: var(--transition);
}

.web3-project:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.web3-project h4 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-size: 1.1rem;
}

.web3-project h4 i {
    font-size: 1.2rem;
}

.web3-project p {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 0;
    line-height: 1.6;
}

.web3-image {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

/* Three.js Canvas for Web3 Section */
.web3-canvas {
    width: 100%;
    height: 400px;
    border-radius: var(--rounded-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: linear-gradient(145deg, #f8fafc, #ffffff);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .web3-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .web3-image {
        order: -1;
        margin-bottom: 1rem;
    }
    
    .web3-canvas {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .web3-text {
        padding: 1rem 0;
    }
    
    .web3-text h3 {
        font-size: 1.3rem;
    }
    
    .web3-text p {
        font-size: 1rem;
    }
    
    .web3-project {
        padding: 1rem;
    }
    
    .web3-project h4 {
        font-size: 1rem;
    }
    
    .web3-canvas {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .web3-text ul li {
        font-size: 0.9rem;
        padding-left: 1.5rem;
    }
    
    .web3-projects {
        margin-top: 1.5rem;
    }
    
    .web3-canvas {
        height: 250px;
    }
    
    .web3-project h4 {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* Animation for Blockchain Nodes */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Web3 Interactive Elements */
.web3-interactive {
    position: relative;
    height: 100%;
    min-height: 300px;
}

.web3-node {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.5);
    animation: float 3s ease-in-out infinite;
}

.web3-node:nth-child(1) {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.web3-node:nth-child(2) {
    top: 60%;
    left: 25%;
    animation-delay: 0.5s;
}

.web3-node:nth-child(3) {
    top: 30%;
    left: 70%;
    animation-delay: 1s;
}

.web3-node:nth-child(4) {
    top: 75%;
    left: 80%;
    animation-delay: 1.5s;
}

.web3-connection {
    position: absolute;
    background-color: rgba(37, 99, 235, 0.2);
    height: 2px;
    transform-origin: left center;
}

/* Mobile adjustments for interactive elements */
@media (max-width: 768px) {
    .web3-interactive {
        min-height: 250px;
    }
    
    .web3-node {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .web3-interactive {
        min-height: 200px;
    }
    
    .web3-node {
        width: 8px;
        height: 8px;
    }
}