:root {
    --bg-color: #1a181f;
    --card-bg: #2d2936;
    --border-color: #4c4659;
    --btn-bg: #cba3c8;
    --accent-secondary: #cba3c8;
    --accent-color: #cba3c8;
    --muted-text: #9a8b9f;
    --text-color: #f2ebf4;
    --font-main: 'Inter', -apple-system, sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    letter-spacing: -0.02em;
    line-height: 1.6;
    overflow-x: hidden;
    overflow-wrap: break-word;
    word-wrap: break-word;
    transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    padding: 40px 0;
    border-bottom: none;
}

.header-flex {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-pill {
    display: flex;
    gap: 10px;
    align-items: center;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 8px 16px;
    transition: border-color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 40px;
    transition: background-color 0.3s, color 0.3s;
}

.nav-link.active {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.nav-link:hover:not(.active) {
    background-color: var(--card-bg);
}

.logo {
    font-family: var(--font-mono);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -2px;
}

.logo span {
    color: var(--accent-secondary);
}

.tagline {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted-text);
    margin-top: 10px;
}

/* Intro & General Sections */
.intro, .about-section {
    padding: 100px 0;
}

.about-section {
    padding-bottom: 50px;
}

.asymmetric-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.section-label {
    font-family: var(--font-mono);
    color: var(--accent-secondary);
    font-weight: 700;
    display: block;
    margin-bottom: 20px;
}

.about-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.about-text p {
    font-size: 1.15rem;
    color: var(--muted-text);
    margin-bottom: 40px;
    max-width: 600px;
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.skill-item h3 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 700;
}

.skill-item p {
    font-size: 0.95rem;
    color: var(--muted-text);
    margin-bottom: 0;
}

.image-box {
    background: var(--card-bg);
    border: 1px dashed var(--border-color);
    aspect-ratio: 1/1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.glitch-container {
    position: relative;
    width: 150px;
    height: 150px;
}

.silhouette {
    width: 100%;
    height: 100%;
    color: var(--border-color);
    opacity: 0.4;
    filter: drop-shadow(0 0 5px var(--accent-secondary));
    animation: glitch-move 4s infinite linear alternate-reverse;
}

.glitch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
}

@keyframes glitch-move {
    0% { transform: translate(0); filter: hue-rotate(0deg); }
    10% { transform: translate(-2px, 2px); }
    20% { transform: translate(2px, -2px); filter: hue-rotate(90deg); }
    30% { transform: translate(-2px, -2px); }
    40% { transform: translate(2px, 2px); }
    50% { transform: translate(-5px, 0); filter: hue-rotate(180deg); opacity: 0.2; }
    51% { transform: translate(5px, 0); opacity: 0.4; }
    100% { transform: translate(0); filter: hue-rotate(360deg); }
}

.glitched-profile::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-secondary);
    opacity: 0.03;
    mix-blend-mode: overlay;
    pointer-events: none;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.football-logic {
    padding-bottom: 100px;
}

.intro-box {
    background: var(--card-bg);
    padding: 30px;
    border-left: 4px solid var(--accent-color);
    max-width: 600px;
    transition: background-color 1.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 5px;
}

.green {
    color: var(--accent-color);
}

/* Projects Grid - Modern */
.projects-grid {
    padding-bottom: 100px;
}

.projects-grid .container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

/* Center last project if it's alone in a 2-col grid */
.projects-grid .project-card:last-child:nth-child(odd) {
    grid-column: 1 / span 2;
    justify-self: center;
    max-width: calc(50% - 20px); /* Matches width of other cards */
    width: 100%;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    transition: background-color 1.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 1.2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.project-header h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0;
}

.project-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    box-shadow: 
        inset 0 2px 5px rgba(0,0,0,0.5),
        0 2px 0 rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.project-link-btn:hover {
    background-color: var(--btn-bg);
    color: var(--text-color);
    border-color: var(--btn-bg);
    box-shadow: 
        inset 0 1px 0 rgba(255,255,255,0.1),
        0 4px 15px rgba(48, 27, 63, 0.6);
    transform: translateY(-2px);
}

.project-image-small img {
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.project-card:hover .project-image-small img {
    transform: scale(1.05);
    opacity: 1 !important;
}

.project-body {
    flex-grow: 1;
    margin-bottom: 30px;
}

.project-body p {
    color: var(--muted-text);
    font-size: 1.05rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--bg-color);
    color: var(--text-color);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: background-color 1.2s cubic-bezier(0.4, 0, 0.2, 1),
                color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--btn-bg);
    color: var(--bg-color);
    text-decoration: none;
    font-weight: 800;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 50px;
    border: none;
    box-shadow: 
        0 4px 0 #a67fa3,
        0 8px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    top: 0;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 0 #a67fa3,
        0 12px 20px rgba(0, 0, 0, 0.4);
}

.btn:active {
    top: 4px;
    box-shadow: 
        0 0 0 #a67fa3,
        0 2px 5px rgba(0, 0, 0, 0.2);
}

body.light-theme .btn {
    color: #fff;
}

/* Footer */
.stack-tab {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--muted-text);
    padding: 6px 14px;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stack-tab.active {
    background: var(--accent-secondary);
    color: var(--bg-color);
    border-color: var(--accent-secondary);
}

.stack-tab:hover:not(.active) {
    border-color: var(--accent-secondary);
    color: var(--text-color);
}

.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted-text);
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 30px 0;
    }

    .header-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .logo {
        font-size: 1.8rem;
    }

    .nav {
        gap: 20px;
    }

    .asymmetric-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-text h1 {
        font-size: 2.5rem;
    }

    .skill-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .projects-grid .container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .project-card {
        padding: 30px 20px;
    }

    .intro, .about-section {
        padding: 60px 0;
    }
}

/* Timeline Slider Styles */
.timeline-section {
    padding: 80px 0 120px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.timeline-wrapper {
    overflow-x: auto;
    padding: 40px 0;
    cursor: grab;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE/Edge */
}

.timeline-wrapper::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.timeline-wrapper:active {
    cursor: grabbing;
}

.timeline-track {
    display: flex;
    gap: 0;
    padding-left: 0;
    min-width: max-content;
    position: relative;
}

.timeline-track::before {
    content: '';
    position: absolute;
    top: 54px; /* Center of the dot */
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, var(--accent-secondary), var(--border-color), transparent);
    z-index: 1;
}

.timeline-item-h {
    width: 350px;
    padding-right: 60px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    background: var(--bg-color);
    border: 2px solid var(--accent-secondary);
    border-radius: 50%;
    margin: 20px 0 30px;
    transition: all 0.3s ease;
    position: relative;
}

.timeline-dot.is-span {
    width: 60px;
    border-radius: 10px;
    background: rgba(203, 163, 200, 0.2);
}

.timeline-item-h:hover .timeline-dot {
    background: var(--accent-secondary);
    box-shadow: 0 0 15px var(--accent-secondary);
    transform: scale(1.1);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--accent-secondary);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-secondary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(203, 163, 200, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(203, 163, 200, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(203, 163, 200, 0); }
}

.timeline-progress-container {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    margin-top: 20px;
    border-radius: 2px;
    overflow: hidden;
}

.timeline-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--accent-secondary);
    transition: width 0.1s ease-out;
}

@media (max-width: 768px) {
    .timeline-item-h {
        width: 300px;
        padding-right: 40px;
    }
}
