:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-bg: #0f172a;
    --light-bg: #1e293b;
    --card-bg: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #475569;
    --success-color: #10b981;
    --warning-color: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: clamp(1rem, 3vw, 2rem);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
    font-size: clamp(0.9rem, 2vw, 1rem);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: clamp(80px, 15vh, 120px) 0 50px;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--light-bg) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2rem, 7vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient 3s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: clamp(0.6rem, 2vw, 0.75rem) clamp(1.5rem, 3vw, 2rem);
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
    transition: left 0.3s ease;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-primary span,
.btn-primary i {
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

/* Blockchain Animation */
.blockchain-animation {
    display: flex;
    gap: clamp(1rem, 3vw, 2rem);
    justify-content: center;
    align-items: center;
}

.block {
    width: clamp(60px, 10vw, 100px);
    height: clamp(60px, 10vw, 100px);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 0.75rem;
    position: relative;
    animation: gentleFloat 4s ease-in-out infinite;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
}

.block:nth-child(1) {
    animation-delay: 0s;
}

.block:nth-child(2) {
    animation-delay: 1.3s;
}

.block:nth-child(3) {
    animation-delay: 2.6s;
}

.block:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.6);
}

@keyframes gentleFloat {
    0%, 100% { 
        transform: translateY(0px);
    }
    50% { 
        transform: translateY(-15px);
    }
}

.block::before {
    content: '';
    position: absolute;
    width: clamp(15px, 2.5vw, 25px);
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    left: calc(-1 * clamp(15px, 2.5vw, 25px));
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
    animation: pulse 2s ease-in-out infinite;
}

.block:first-child::before {
    display: none;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 0.4; 
    }
    50% { 
        opacity: 0.8; 
    }
}

/* Sections */
section {
    padding: clamp(3rem, 8vw, 5rem) 0;
}

.section-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    text-align: center;
    margin-bottom: clamp(2rem, 5vw, 3rem);
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: clamp(2rem, 5vw, 3rem);
    align-items: start;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: clamp(0.95rem, 2vw, 1.05rem);
}

.stats {
    display: flex;
    gap: clamp(1rem, 3vw, 2rem);
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    flex: 1;
    min-width: 100px;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
}

.stat:hover {
    transform: translateY(-5px);
}

.stat h3 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-secondary);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.info-card {
    background: var(--light-bg);
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.1);
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: clamp(1.1rem, 2vw, 1.25rem);
}

.info-card ul {
    list-style: none;
}

.info-card li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.info-card li::before {
    content: "▸ ";
    color: var(--primary-color);
}

/* Experience Section */
.timeline {
    position: relative;
    padding-left: clamp(1.5rem, 3vw, 2rem);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(-1 * clamp(1.5rem, 3vw, 2.5rem));
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--dark-bg);
    transition: all 0.3s ease;
}

.timeline-item:hover::before {
    box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.2);
}

.timeline-date {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.timeline-content h3 {
    margin-bottom: 0.5rem;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
}

.timeline-content h4 {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
}

.timeline-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--card-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
}

.project-card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: clamp(1.5rem, 3vw, 2rem);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.project-card:hover::before {
    transform: translateX(0);
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-header h3 {
    color: var(--text-primary);
    font-size: clamp(1.1rem, 2vw, 1.3rem);
}

.project-status {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    font-weight: 600;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.project-tech span {
    background: var(--card-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    color: var(--text-secondary);
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.timeline-content .project-links {
    margin-top: 1rem;
}

.project-links a {
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(0.8rem, 1.5vw, 0.875rem);
    transition: all 0.3s ease;
}

.project-links a:hover {
    color: var(--secondary-color);
    transform: translateX(3px);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
}

.skill-category {
    background: var(--light-bg);
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-category:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.1);
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: clamp(1.1rem, 2vw, 1.25rem);
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-item {
    background: var(--card-bg);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: clamp(0.8rem, 1.5vw, 0.875rem);
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.skill-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px) scale(1.05);
}

/* Contact Section */
.contact {
    background: var(--light-bg);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.contact-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.contact-intro {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(1.5rem, 3vw, 2rem);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: clamp(0.9rem, 2vw, 1rem);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.contact-item:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.contact-item i {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: var(--dark-bg);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 2vw, 1rem);
}

/* Tablet Responsive (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        max-width: 95%;
    }

    .nav-menu {
        gap: 1.5rem;
    }

    .hero .container {
        grid-template-columns: 1.2fr 1fr;
        text-align: left;
    }

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

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blockchain-animation {
        scale: 0.85;
    }

    .project-header {
        flex-direction: row;
        align-items: center;
    }

    .project-card {
        text-align: left;
    }

    .project-tech,
    .project-links,
    .tags {
        justify-content: flex-start;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(30, 41, 59, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        font-size: 1.2rem;
    }

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

    .hamburger {
        display: flex;
    }

    .hero {
        padding-top: 80px;
        text-align: center;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-visual {
        display: block !important;
        margin-top: 2rem;
    }

    .blockchain-animation {
        scale: 0.7;
        justify-content: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-text {
        text-align: left;
    }

    .stats {
        justify-content: center;
        flex-wrap: wrap;
    }

    .timeline {
        padding-left: 1rem;
    }

    .timeline-item::before {
        left: -1.5rem;
        width: 10px;
        height: 10px;
    }

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

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

    .section-title {
        text-align: center;
    }

    .section-title::after {
        width: 40px;
    }

    .project-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }

    .project-card {
        text-align: center;
    }

    .project-tech {
        justify-content: center;
    }

    .project-links {
        justify-content: center;
    }

    .timeline-content .project-links {
        justify-content: flex-start;
    }

    .tags {
        justify-content: center;
    }

    .timeline-content .tags {
        justify-content: flex-start;
    }

    .skill-category {
        text-align: center;
    }

    .skill-items {
        justify-content: center;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .stats {
        flex-direction: column;
        gap: 1rem;
    }

    .stat {
        width: 100%;
    }

    .timeline::before {
        display: none;
    }

    .timeline-item::before {
        display: none;
    }

    .timeline-item {
        padding-left: 0;
        padding-bottom: 2rem;
        border-left: 3px solid var(--primary-color);
        padding-left: 1rem;
        margin-left: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-visual,
    .hamburger {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .section-title {
        color: black;
        -webkit-text-fill-color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}