/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%);
    min-height: 100vh;
    color: #1e3a8a;
    line-height: 1.6;
}

/* Notebook container */
.notebook-container {
    max-width: 1000px;
    margin: 20px auto;
    background: white;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

/* Spiral binding effect */
.spiral-binding {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    background: linear-gradient(to right, #e8e8e8, #d0d0d0);
    border-right: 3px solid #b0b0b0;
    z-index: 1;
}

.spiral-holes {
    position: absolute;
    left: 20px;
    top: 30px;
    bottom: 30px;
    width: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hole {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    border: 2px solid #888;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

/* Orange margin line */
.red-margin {
    position: absolute;
    left: 70px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ff8c42;
    z-index: 1;
}

/* Ruled paper lines */
.content {
    margin-left: 90px;
    padding: 50px 50px 50px 30px;
    background-image: 
        repeating-linear-gradient(
            transparent 0px,
            transparent 29px,
            rgba(180,180,180,0.5) 29px,
            rgba(180,180,180,0.5) 30px
        );
    min-height: 100vh;
    position: relative;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    left: 20px;
    bottom: 30px;
    width: 70px;
    height: 70px;
    background: linear-gradient(145deg, #f59e0b, #d97706);
    border: 3px solid #fbbf24;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.6);
    transform: translateY(0);
    opacity: 1;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 999;
    animation: pencilBounce 2s ease-in-out infinite;
}

.back-to-top.scrolled {
    background: linear-gradient(145deg, #2c5aa0, #1e3a8a);
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(44, 90, 160, 0.6);
}

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

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 35px rgba(245, 158, 11, 0.8);
    animation: none;
}

.back-to-top.scrolled:hover {
    box-shadow: 0 15px 35px rgba(44, 90, 160, 0.8);
}

/* Pencil icon styles */
.pencil-icon {
    width: 45px;
    height: 45px;
    position: relative;
    transform: rotate(45deg);
}

.pencil-body {
    width: 6px;
    height: 36px;
    background: linear-gradient(to bottom, #f4d03f 0%, #f7dc6f 70%, #e67e22 100%);
    border-radius: 3px;
    position: absolute;
    left: 50%;
    top: 2px;
    transform: translateX(-50%);
}

.pencil-tip {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 10px solid #2c3e50;
    position: absolute;
    left: 50%;
    top: -8px;
    transform: translateX(-50%);
}

.pencil-eraser {
    width: 10px;
    height: 8px;
    background: #e74c3c;
    border-radius: 5px 5px 3px 3px;
    position: absolute;
    left: 50%;
    bottom: -3px;
    transform: translateX(-50%);
}

.pencil-ferrule {
    width: 8px;
    height: 4px;
    background: #bdc3c7;
    position: absolute;
    left: 50%;
    bottom: 5px;
    transform: translateX(-50%);
}

/* Navigation Menu */
.nav-menu {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 15px 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(245, 158, 11, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-menu:hover {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: rgba(245, 158, 11, 0.5);
}

.nav-item {
    display: block;
    padding: 12px 20px;
    margin: 5px 0;
    text-decoration: none;
    color: #1e3a8a;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(44, 90, 160, 0.1), transparent);
    transition: left 0.5s;
}

.nav-item:hover::before {
    left: 100%;
}

.nav-item:hover {
    background: linear-gradient(135deg, #2c5aa0, #1e3a8a);
    color: white;
    transform: translateX(-3px);
    box-shadow: 0 5px 15px rgba(44, 90, 160, 0.3);
}

.nav-item.active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.4);
    transform: translateX(-3px);
    border-left: 3px solid #fbbf24;
}

.nav-item i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* Header section */
.header {
    text-align: center;
    margin-bottom: 60px;
    padding-bottom: 30px;
    border-bottom: 4px double #1e3a8a;
    position: relative;
}

.name {
    font-size: 3rem;
    font-weight: bold;
    color: #1e3a8a;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    letter-spacing: -1px;
    position: relative;
}

.name::after {
    content: '★';
    position: absolute;
    top: -10px;
    right: -20px;
    color: #f59e0b;
    font-size: 1.5rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.title {
    font-size: 1.4rem;
    color: #ff8c42;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tagline {
    font-style: italic;
    color: #64748b;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.handwriting {
    font-family: 'Comic Sans MS', cursive;
    color: #2c5aa0;
    font-size: 1.1rem;
    transform: rotate(-1deg);
    margin: 15px 0;
}

/* Social media icons */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.social-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

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

.social-icon:hover::before {
    left: 100%;
}

.social-icon.linkedin {
    background: #0077b5;
    color: white;
}

.social-icon.github {
    background: #333;
    color: white;
}

.social-icon.x-twitter {
    background: #000000;
    color: white;
}

.social-icon.email {
    background: #ff8c42;
    color: white;
    border: 3px solid #f59e0b !important;
}

.social-icon:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4);
}

/* Section styling */
.section {
    margin-bottom: 60px;
    padding: 30px;
    background: rgba(255,255,255,0.9);
    border-radius: 15px;
    border-left: 6px solid #2c5aa0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    backdrop-filter: blur(10px);
    position: relative;
}

.section-title {
    font-size: 2.2rem;
    color: #1e3a8a;
    margin-bottom: 25px;
    text-decoration: underline;
    text-decoration-color: #ff8c42;
    text-decoration-thickness: 3px;
    text-underline-offset: 8px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.section-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -15px;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #f59e0b, #d97706);
    border-radius: 2px;
}

.section-title::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -40px;
    left: 0;
    background: rgba(30, 58, 138, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: normal;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.section-title:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.section-title:hover {
    color: #2c5aa0;
    text-decoration-color: #f59e0b;
}

.about-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-content p {
    margin-bottom: 20px;
}

.highlight {
    background: linear-gradient(120deg, #fbbf24 0%, #f59e0b 50%, #ff8c42 100%);
    background-repeat: no-repeat;
    background-size: 100% 45%;
    background-position: 0 75%;
    padding: 3px 6px;
    font-weight: bold;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

/* Skills grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.skill-category {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    transform: perspective(1000px) rotateX(0deg);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.skill-category:hover {
    transform: perspective(1000px) rotateX(5deg) translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.skill-category h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 2px solid #f59e0b;
    padding-bottom: 10px;
    color: white;
}

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

.skill-list li {
    padding: 8px 0;
    position: relative;
    padding-left: 25px;
}

.skill-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #ff8c42;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Project cards */
.project-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 2px dashed #2c5aa0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(44, 90, 160, 0.1), transparent);
    transition: left 0.6s;
}

.project-card:hover::before {
    left: 100%;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #f59e0b;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: #1e3a8a;
}

.project-title {
    color: #1e3a8a;
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.project-description {
    color: #555;
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    background: linear-gradient(135deg, #2c5aa0, #1e3a8a);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(44, 90, 160, 0.3);
    transition: all 0.3s ease;
}

.tech-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 90, 160, 0.4);
}

/* Contact section */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.contact-item:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    border-color: #2c5aa0;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2c5aa0, #1e3a8a);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.contact-item a {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #1e3a8a;
}

/* Decorative elements */
.doodle {
    position: absolute;
    opacity: 0.1;
    font-size: 3rem;
    color: #2c5aa0;
    z-index: 0;
}

.doodle.star {
    top: 20%;
    right: 8%;
    transform: rotate(15deg);
}

.doodle.lightbulb {
    bottom: 25%;
    left: 12%;
    transform: rotate(-10deg);
}

.doodle.rocket {
    top: 40%;
    right: 5%;
    transform: rotate(25deg);
}

/* Responsive design */
@media (max-width: 768px) {
    .notebook-container {
        margin: 10px;
    }
    
    .content {
        margin-left: 60px;
        padding: 30px 20px 30px 20px;
    }
    
    .name {
        font-size: 2.2rem;
    }
    
    .section {
        padding: 20px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .social-icons {
        gap: 15px;
    }
    
    .social-icon {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .content {
        margin-left: 40px;
        padding: 20px 15px;
    }
    
    .spiral-binding {
        width: 35px;
    }
    
    .red-margin {
        left: 50px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Animation for page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeInUp 0.6s ease-out forwards;
}

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