/* ========================================
   GLOBAL STYLES & ANIMATIONS
======================================== */

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

/* Body and background grid animation */
body {
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 0;
    background-color: black;
    color: #00FF00;
    position: relative;
}

/* Animated grid background */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(#00FF00 1px, transparent 1px), linear-gradient(90deg, #00FF00 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.1; /* Very subtle effect */
    animation: gridMove 10s linear infinite;
    z-index: -1;
}

@keyframes gridMove {
    from { transform: translate(0, 0); }
    to { transform: translate(-50px, -50px); }
}

/* ========================================
   HEADER & NAVIGATION
======================================== */

header {
    background-color: black;
    color: #00FF00;
    padding: 10px 0;
    border-bottom: 1px solid #00FF00;
}

/* Sticky navigation */
nav {
    position: sticky;
    top: 0;
    background-color: black;
    z-index: 100;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    text-align: center;
}

nav ul li {
    display: inline;
    margin: 0 15px;
}

nav ul li a {
    color: #00FF00;
    text-decoration: none;
    font-weight: bold;
    transition: text-shadow 1s;
}

nav ul li a:hover {
    text-shadow: 0 0 10px #00FF00;
    color: #000000;
}

/* ========================================
   TYPED WELCOME MESSAGE
======================================== */

.typed-message h1 {
    font-size: 3em;
    white-space: nowrap;
    overflow: hidden;
    border-right: 0.3em solid #00FF00; /* Cursor effect */
    letter-spacing: .02em;
    
    width: 0; /* Start hidden */
    animation: 
        typing 3.6s steps(8), 
        blink-caret 0.75s step-end infinite;
    animation-fill-mode: forwards; /* Hold the last frame after animation ends */
    animation-delay: 4s;
}

@keyframes typing {
    from { width: 0; }
    to { width: 9ch; } /* Adjust according to your welcome message */
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #00FF00; }
}

/* ========================================
   SECTION STYLES & HEADINGS
======================================== */

/* General section styling */
section {
    max-width: 1200px;
    margin: 0 auto 40px auto;
    padding: 20px;
    box-sizing: border-box;
    border: 1px solid #00FF00;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

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

/* Glowing section headings */
h2 {
    color: #00FF00;
    position: relative;
    text-shadow: 0 0 10px #00FF00, 0 0 20px #00FF00;
    animation: glow 2s infinite;
}

@keyframes glow {
    0% { text-shadow: 0 0 10px #00FF00, 0 0 20px #00FF00; }
    50% { text-shadow: 0 0 20px #00FF00, 0 0 30px #00FF00; }
    100% { text-shadow: 0 0 10px #00FF00, 0 0 20px #00FF00; }
}

main {
    padding: 20px;
}

/* ========================================
   SKILLS SECTION & CANVAS ANIMATIONS
======================================== */

.skills-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    border: 1px solid #00FF00;
    flex-wrap: nowrap;
}

/* Canvas wrapper (for each canvas inside the skills section) */
.canvas-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 10px;
    border: 1px solid #00FF00;
    box-sizing: border-box;
    min-width: 280px;
    max-width: none;
}

/* Center the titles inside each canvas-wrapper */
.canvas-wrapper h2 {
    text-align: center;
    color: #00FF00;
    margin: 0 0 10px 0;
    padding: 0;
    font-size: 1.2em;
}

/* Canvas styling */
canvas {
    display: block;
    background-color: black;
    border: 1px solid #00FF00;
    width: 100%;
    height: 300px;
    margin-top: 10px;
    box-sizing: border-box;
}

/* Relevant coursework section */
.relevant-coursework {
    margin-top: 40px;
    padding: 10px;
    border: 1px solid #00FF00;
}

.relevant-coursework p {
    line-height: 1.6;
}

/* ========================================
   WORK EXPERIENCE - TIMELINE STYLING
======================================== */

.timeline-container {
    position: relative;
    padding: 20px 0;
}

/* Main timeline line */
.timeline-container::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #00FF00, #006600);
    box-shadow: 2px 0 0 #006600;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-left: 100px;
}

/* Timeline dots */
.timeline-dot {
    position: absolute;
    left: 42px;
    top: 20px;
    width: 20px;
    height: 20px;
    background: #00FF00;
    border: 3px solid #006600;
    border-radius: 0;
    box-shadow: 
        2px 2px 0px #006600,
        4px 4px 0px #003300;
    z-index: 1;
}

.timeline-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: #000000;
    border-radius: 0;
}

/* Date badge */
.date-badge {
    position: absolute;
    left: -20px;
    top: 15px;
    background: #FFFF00;
    color: #000000;
    padding: 5px 10px;
    font-size: 0.7em;
    font-weight: bold;
    border: 2px solid #CCCC00;
    box-shadow: 
        2px 2px 0px #CCCC00,
        4px 4px 0px #999900;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    transform: rotate(-10deg);
    z-index: 2;
}

/* Work experience card */
.work-card {
    background: rgba(0, 255, 0, 0.05);
    border: 2px solid #00FF00;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 
        4px 4px 0px #006600,
        8px 8px 0px #003300;
}

.work-title {
    color: #00FF00;
    font-size: 1.3em;
    font-weight: bold;
    text-shadow: 2px 2px 0px #006600;
    margin: 0 0 10px 0;
    font-family: 'Courier New', monospace;
    display: inline-block;
}

/* Blinking cursor effect from terminal style */
.work-title::after {
    content: "_";
    animation: terminalCursor 1.5s infinite;
    margin-left: 2px;
    color: #00FF00;
}

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

.work-company {
    color: #00FFFF;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 1em;
}

.work-responsibilities {
    list-style: none;
    padding: 0;
    margin: 0;
}

.work-responsibilities li {
    color: #CCCCCC;
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.4;
}

.work-responsibilities li::before {
    content: "▶";
    color: #00FF00;
    position: absolute;
    left: 0;
    font-size: 0.8em;
}

/* Connecting line from dot to card */
.timeline-item::after {
    content: '';
    position: absolute;
    left: 62px;
    top: 30px;
    width: 30px;
    height: 2px;
    background: #00FF00;
    box-shadow: 0 2px 0 #006600;
}

/* ASCII decoration */
.timeline-decoration {
    position: absolute;
    right: 20px;
    top: 20px;
    color: #006600;
    font-size: 0.8em;
    font-family: 'Courier New', monospace;
    opacity: 0.5;
}

/* ========================================
   PROJECT CARDS - RETRO EFFECT
======================================== */

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* Main project card styling with 3D shadow effect */
.project-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 2px solid #00FF00;
    padding: 20px;
    border-radius: 8px;
    background: rgba(0, 255, 0, 0.05);
    backdrop-filter: blur(10px);
    box-shadow: 
        4px 4px 0px #006600,
        8px 8px 0px #003300,
        0 0 20px rgba(0, 255, 0, 0.2);
    transition: all 0.8s linear;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Border effect for cards */
.project-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00FF00, #00AA00, #00FF00);
    border-radius: 10px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.8s linear;
}

/* Card hover effects */
.project-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 
        8px 8px 0px #006600,
        12px 12px 0px #003300,
        16px 16px 0px #001100,
        0 0 30px rgba(0, 255, 0, 0.4);
    background: rgba(0, 255, 0, 0.1);
}

.project-card:hover::before {
    opacity: 0.3;
}

/* Card click/active effects - creates flash animation */
.project-card:active {
    transform: translate(0px, 0px);
    box-shadow: 
        2px 2px 0px #006600,
        0 0 20px rgba(255, 255, 255, 0.8);
    animation: rigidFlash 0.1s linear;
}

@keyframes rigidFlash {
    0% { 
        background: rgba(255, 255, 255, 0.9);
        border-color: #FFFFFF;
    }
    100% { 
        background: rgba(0, 255, 0, 0.1);
        border-color: #00FF00;
    }
}

/* Project image styling */
.project-image {
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border: 1px solid #00FF00;
    border-radius: 4px;
    transition: all 0.8s linear;
}

.project-card:hover .project-image img {
    transform: scale(1.02);
    box-shadow: 2px 2px 0px #006600;
}

/* Project content text styling */
.project-content h3 {
    margin: 0 0 10px 0;
    color: #00FF00;
    text-shadow: 2px 2px 0px #006600;
    transition: all 0.8s linear;
}

.project-card:hover .project-content h3 {
    color: #FFFFFF;
    text-shadow: 2px 2px 0px #008800;
}

/* 8-bit Coming Soon Tag */
.coming-soon-tag {
    display: inline-block;
    background: #FF0000;
    color: #FFFFFF;
    font-size: 0.6em;
    font-weight: bold;
    padding: 2px 6px;
    border: 1px solid #AA0000;
    border-radius: 0;
    box-shadow: 
        1px 1px 0px #AA0000,
        2px 2px 0px #660000;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    vertical-align: middle;
    animation: pixelBlink 2s infinite;
}

@keyframes pixelBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.7; }
}

.project-card:hover .coming-soon-tag {
    background: #FF3333;
    border-color: #CC0000;
    box-shadow: 
        1px 1px 0px #CC0000,
        2px 2px 0px #880000;
}

.co-creator {
    font-size: 0.8em;
    color: #888;
    font-style: italic;
    transition: color 0.8s linear;
}

.project-card:hover .co-creator {
    color: #BBB;
}

.tech-stack {
    margin: 0;
    color: #888;
    font-size: 0.9em;
    transition: color 0.8s linear;
}

.project-card:hover .tech-stack {
    color: #AAA;
}

/* ========================================
   CONTACT & SOCIAL MEDIA SECTION
======================================== */

#contact-info {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

#contact-info h2 {
    color: #00FF00;
}

/* Social links container */
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

/* Style for each social media icon */
.social-icon {
    color: #00FF00;
    font-size: 2em;
    transition: color 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    color: #FFFFFF;
}

/* ========================================
   UTILITY COMPONENTS
======================================== */

/* Scroll to top button */
#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #00FF00;
    color: black;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
}

/* Footer styling */
footer {
    text-align: center;
    padding: 10px 0;
    background-color: black;
    color: #00FF00;
    border-top: 1px solid #00FF00;
}

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

/* Large tablet breakpoint */
@media (max-width: 1200px) {
    .skills-container {
        gap: 15px;
        padding: 15px;
    }
    
    .canvas-wrapper {
        min-width: 250px;
        padding: 8px;
    }
    
    .canvas-wrapper h2 {
        font-size: 1.1em;
    }
}

/* Tablet breakpoint */
@media (max-width: 900px) {
    .skills-container {
        gap: 10px;
        padding: 10px;
    }
    
    .canvas-wrapper {
        min-width: 220px;
        padding: 6px;
    }
    
    .canvas-wrapper h2 {
        font-size: 1em;
    }
    
    canvas {
        height: 250px;
    }
}

/* Small tablet/large mobile breakpoint */
@media (max-width: 768px) {
    .skills-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .canvas-wrapper {
        width: 100%;
        max-width: 500px;
        min-width: unset;
    }

    canvas {
        width: 100%;
        height: 280px;
    }
}

/* Mobile breakpoint */
@media (max-width: 600px) {
    .skills-container {
        padding: 15px 10px;
    }
    
    .canvas-wrapper {
        max-width: 100%;
        padding: 10px;
    }
    
    canvas {
        height: 250px;
    }
}

/* Small mobile breakpoint */
@media (max-width: 480px) {
    .canvas-wrapper h2 {
        font-size: 0.9em;
    }
    
    canvas {
        height: 220px;
    }
}
