/* ===================================
   Portfolio - Modern CSS
   Author: Anubhav Panda
   =================================== */

/* JoJo Font - CC Wild Words Bold Italic */
@import url('https://fonts.cdnfonts.com/css/cc-wild-words');

/* CSS Custom Properties */
:root {
    /* Colors - Light Theme */
    --color-primary: #1C3E7B;
    --color-primary-light: #2952a3;
    --color-primary-dark: #152d5a;
    --color-accent: #4A90D9;

    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-bg-elevated: #ffffff;

    --color-text: #1e293b;
    --color-text-secondary: #64748b;
    --color-text-muted: #94a3b8;

    --color-border: #e2e8f0;
    --color-border-light: #f1f5f9;

    /* Semantic Colors */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-info: #3b82f6;
    --color-research: #8b5cf6;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Layout */
    --max-width: 1200px;
    --nav-height: 70px;

    /* Borders */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --color-bg: #0f172a;
    --color-bg-alt: #1e293b;
    --color-bg-elevated: #1e293b;

    --color-text: #f1f5f9;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;

    --color-border: #334155;
    --color-border-light: #1e293b;

    --color-primary-light: #5b9bd5;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.4);
}

/* ===================================
   Reset & Base
   =================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-base), color var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-light);
}

strong {
    font-weight: 600;
    color: var(--color-text);
}

em {
    font-style: italic;
}

::selection {
    background-color: var(--color-primary);
    color: white;
}

/* ===================================
   Utilities
   =================================== */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

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

/* ===================================
   Navigation
   =================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border-light);
    z-index: 1000;
    transition: transform var(--transition-base), background-color var(--transition-base), box-shadow var(--transition-base);
}

[data-theme="dark"] .nav {
    background-color: rgba(15, 23, 42, 0.9);
}

.nav.scrolled {
    box-shadow: var(--shadow-md);
}

.nav.hidden {
    transform: translateY(-100%);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nav-logo {
    display: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    list-style: none;
}


.nav-link {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    position: relative;
    padding: var(--space-2) 0;
}

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    transition: all var(--transition-base);
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.theme-toggle {
    position: absolute;
    right: var(--space-6);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--space-20) var(--space-6);
    position: relative;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-8);
}

.hero-image {
    width: 180px;
    height: 180px;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 4px solid var(--color-primary);
    box-shadow: var(--shadow-xl);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hero-image:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 50px -12px rgba(28, 62, 123, 0.25);
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-greeting {
    font-family: var(--font-mono);
    font-size: var(--font-size-base);
    color: var(--color-primary);
    margin-bottom: var(--space-2);
}

.hero-name {
    font-size: var(--font-size-5xl);
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: var(--space-4);
}

.hero-title {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    max-width: 500px;
}

.hero-title a {
    color: var(--color-primary);
    font-weight: 500;
    border-bottom: 1px dashed var(--color-primary);
}

.hero-title a:hover {
    border-bottom-style: solid;
}

.hero-social {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.hero-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    font-size: var(--font-size-xl);
    transition: all var(--transition-fast);
}

.hero-social a:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.scroll-indicator {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ===================================
   Sections
   =================================== */
.section {
    padding: var(--space-24) 0;
}

.section-alt {
    background-color: var(--color-bg-alt);
}

.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-12);
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--color-border);
    max-width: 300px;
}

.section-number {
    font-family: var(--font-mono);
    font-size: var(--font-size-lg);
    color: var(--color-primary);
    font-weight: 500;
}

/* ===================================
   About Section
   =================================== */
.about-content {
    max-width: 700px;
}

.about-text p {
    margin-bottom: var(--space-6);
    color: var(--color-text-secondary);
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* About Grid Layout */
.about-grid {
    display: block;
}

.fpga-chip {
    position: relative;
    width: 280px;
    height: 280px;
    cursor: crosshair;
    perspective: 1000px;
}

/* Ambient glow effect */
.chip-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(28, 62, 123, 0.3) 0%, transparent 70%);
    filter: blur(30px);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.fpga-chip:hover .chip-glow {
    opacity: 1;
}

.chip-core {
    position: absolute;
    top: 24px;
    left: 24px;
    right: 24px;
    bottom: 24px;
    background: linear-gradient(165deg, #0d0d14 0%, #1a1a2e 50%, #0f0f1a 100%);
    border-radius: 4px;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.05) inset,
        0 -1px 0 rgba(0,0,0,0.3) inset,
        0 25px 50px -12px rgba(0,0,0,0.5),
        0 0 0 1px rgba(255,255,255,0.03);
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.fpga-chip:hover .chip-core {
    transform: translateZ(8px);
}

/* Subtle surface texture */
.chip-core::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255,255,255,0.01) 2px,
            rgba(255,255,255,0.01) 4px
        );
    pointer-events: none;
}

.logic-grid {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(10, 1fr);
    gap: 4px;
}

.logic-cell {
    background: rgba(28, 62, 123, 0.15);
    border-radius: 1px;
    transition: background 0.25s ease-out, box-shadow 0.3s ease-out, transform 0.2s ease-out;
    position: relative;
    will-change: background, box-shadow;
}

.logic-cell::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 50%);
    border-radius: inherit;
}

.logic-cell.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow:
        0 0 12px rgba(37, 99, 235, 0.6),
        0 0 24px rgba(37, 99, 235, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

.logic-cell.pulse {
    animation: cellPulse 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes cellPulse {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.15); filter: brightness(1.3); }
    100% { transform: scale(1); filter: brightness(1); }
}

/* Reflection overlay */
.chip-reflection {
    position: absolute;
    top: 24px;
    left: 24px;
    right: 24px;
    bottom: 24px;
    background: linear-gradient(
        145deg,
        rgba(255,255,255,0.08) 0%,
        transparent 40%,
        transparent 60%,
        rgba(255,255,255,0.02) 100%
    );
    border-radius: 4px;
    pointer-events: none;
    z-index: 10;
}

/* Chip Pins - refined */
.chip-pins {
    position: absolute;
    display: flex;
    justify-content: space-evenly;
    z-index: 5;
}

.chip-pins-top, .chip-pins-bottom {
    left: 36px;
    right: 36px;
    height: 20px;
    flex-direction: row;
}

.chip-pins-top { top: 4px; }
.chip-pins-bottom { bottom: 4px; }

.chip-pins-left, .chip-pins-right {
    top: 36px;
    bottom: 36px;
    width: 20px;
    flex-direction: column;
}

.chip-pins-left { left: 4px; }
.chip-pins-right { right: 4px; }

.chip-pin {
    background: linear-gradient(180deg, #b8b8b8 0%, #707070 50%, #909090 100%);
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.chip-pins-top .chip-pin,
.chip-pins-bottom .chip-pin {
    width: 6px;
    height: 16px;
}

.chip-pins-left .chip-pin,
.chip-pins-right .chip-pin {
    width: 16px;
    height: 6px;
}

.chip-pin.signal {
    background: linear-gradient(180deg, #4ade80 0%, #22c55e 50%, #16a34a 100%);
    box-shadow:
        0 0 8px rgba(74, 222, 128, 0.7),
        0 0 16px rgba(74, 222, 128, 0.4);
}

/* ===================================
   Timeline (Education)
   =================================== */
.timeline {
    position: relative;
    padding-left: var(--space-8);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-border));
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-10);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: calc(-1 * var(--space-8) - 5px);
    top: 0;
    width: 12px;
    height: 12px;
    background-color: var(--color-primary);
    border-radius: var(--radius-full);
    border: 3px solid var(--color-bg);
    box-shadow: 0 0 0 3px var(--color-primary);
}

[data-theme="dark"] .timeline-marker {
    border-color: var(--color-bg);
}

.timeline-content {
    background-color: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.timeline-content:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-3);
}

.institution-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.timeline-header h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-1);
}

.timeline-header h3 a {
    color: inherit;
}

.timeline-header h3 a:hover {
    color: var(--color-primary);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: var(--font-size-sm);
    color: var(--color-primary);
}

.timeline-content > p {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

/* Nostalgic timeline item */
.timeline-marker-nostalgic {
    background-color: var(--color-text-muted) !important;
    box-shadow: 0 0 0 3px var(--color-text-muted) !important;
}

.timeline-content-nostalgic {
    border-style: dashed !important;
    border-color: var(--color-text-muted) !important;
    opacity: 0.8;
}

.timeline-content-nostalgic h3 {
    color: var(--color-text-muted);
    font-style: italic;
}

.timeline-content-nostalgic .timeline-date {
    color: var(--color-text-muted);
}

.timeline-content-nostalgic:hover {
    opacity: 1;
    border-color: var(--color-primary) !important;
}

/* ===================================
   Projects Grid
   =================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
}

.project-card {
    background-color: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-4);
}

.project-icon {
    font-size: var(--font-size-2xl);
    color: var(--color-primary);
}

.project-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-3);
    line-height: 1.4;
}

.project-description {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: var(--space-4);
}

.project-date {
    font-family: var(--font-mono);
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: var(--font-size-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.badge-published {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    border: 1px solid var(--color-success);
}

.badge-published:hover {
    background-color: var(--color-success);
    color: white;
}

.badge-submitted {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
    border: 1px solid var(--color-warning);
}

.badge-submitted:hover {
    background-color: var(--color-warning);
    color: white;
}

.badge-project {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--color-info);
    border: 1px solid var(--color-info);
}

.badge-project:hover {
    background-color: var(--color-info);
    color: white;
}

.badge-research {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--color-research);
    border: 1px solid var(--color-research);
}

.badge-research:hover {
    background-color: var(--color-research);
    color: white;
}

/* ===================================
   Contact Section
   =================================== */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-text {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-8);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-8);
    font-size: var(--font-size-base);
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--color-primary-light);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===================================
   Footer
   =================================== */
.footer {
    padding: var(--space-12) 0;
    border-top: 1px solid var(--color-border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

.footer-social {
    display: flex;
    gap: var(--space-4);
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

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

.footer-text {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.footer-copyright {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

/* ===================================
   Reveal Animations
   =================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animations for hero */
.hero .reveal:nth-child(1) { transition-delay: 0.1s; }
.hero .reveal:nth-child(2) { transition-delay: 0.2s; }
.hero .reveal:nth-child(3) { transition-delay: 0.3s; }
.hero .reveal:nth-child(4) { transition-delay: 0.4s; }
.hero-text .reveal:nth-child(1) { transition-delay: 0.2s; }
.hero-text .reveal:nth-child(2) { transition-delay: 0.3s; }
.hero-text .reveal:nth-child(3) { transition-delay: 0.4s; }
.hero-text .reveal:nth-child(4) { transition-delay: 0.5s; }

/* ===================================
   Evil Mode (13th Glitch)
   =================================== */
.hero-image.evil-avatar {
    border-color: #cc0000 !important;
    box-shadow: 0 0 20px rgba(204, 0, 0, 0.6), 0 0 40px rgba(204, 0, 0, 0.3) !important;
    animation: evilPulse 0.5s ease-in-out infinite alternate;
}

@keyframes evilPulse {
    0% {
        box-shadow: 0 0 20px rgba(204, 0, 0, 0.6), 0 0 40px rgba(204, 0, 0, 0.3);
    }
    100% {
        box-shadow: 0 0 30px rgba(204, 0, 0, 0.8), 0 0 60px rgba(204, 0, 0, 0.5);
    }
}

.evil-drip {
    font-family: 'Times New Roman', Times, serif !important;
    font-weight: 700 !important;
    font-size: 3.4em !important;
    color: #cc0000 !important;
    letter-spacing: 0.02em !important;
}

/* Blinking cursor for evil mode */
.evil-cursor {
    display: inline-block;
    font-weight: 400;
    animation: cursorBlink 0.5s step-end infinite;
    vertical-align: middle;
    margin-left: 1px;
    position: relative;
    top: -0.15em;
}

/* Each typed character */
.evil-char {
    display: inline;
}

.evil-period {
    display: inline;
    opacity: 0;
    transition: opacity 0.1s ease-in;
}

.evil-period.visible {
    opacity: 1;
}

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

/* Evil Mode - Full page takeover */
body.evil-mode {
    background-color: #cc0000 !important;
    overflow: hidden !important;
}

body.evil-mode .nav {
    background-color: #cc0000 !important;
    border-bottom-color: #000 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.evil-mode .nav-menu,
body.evil-mode .theme-toggle {
    visibility: hidden !important;
}

body.evil-mode .nav-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 70px;
    background-image: url('../../images/seele.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

body.evil-mode .nav-container::after {
    display: none;
}

body.evil-mode .hero {
    background-color: #cc0000 !important;
}

body.evil-mode .hero-name:not(.evil-drip) {
    color: #000 !important;
}

body.evil-mode .hero-subtitle,
body.evil-mode .hero-title,
body.evil-mode .typing-text {
    color: #000 !important;
}

body.evil-mode .hero-title a {
    color: #000 !important;
    border-color: #000 !important;
}

body.evil-mode .hero-social a {
    color: #000 !important;
    border-color: #000 !important;
}

body.evil-mode .hero-image {
    border-color: #000 !important;
    box-shadow: none !important;
}

body.evil-mode .hero-image.evil-avatar {
    border-color: #000 !important;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 0, 0, 0.3) !important;
    animation: none !important;
}

body.evil-mode .evil-drip {
    color: #000 !important;
    font-size: 2.8em !important;
    font-weight: 800 !important;
}

body.evil-mode .evil-cursor {
    color: #000 !important;
}

body.evil-mode .hero-title,
body.evil-mode .hero-social {
    display: none !important;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 60px;
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--color-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--space-8);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        font-size: var(--font-size-xl);
    }

    .nav-toggle {
        display: flex;
    }

    .hero-name {
        font-size: var(--font-size-4xl);
    }

    .hero-image {
        width: 150px;
        height: 150px;
    }

    .section {
        padding: var(--space-16) 0;
    }

    .section-title {
        font-size: var(--font-size-xl);
    }

    .section-title::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: var(--font-size-3xl);
    }

    .hero-title {
        font-size: var(--font-size-base);
    }

    .hero-social a {
        width: 44px;
        height: 44px;
    }

    .timeline {
        padding-left: var(--space-6);
    }

    .timeline-marker {
        left: calc(-1 * var(--space-6) - 5px);
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-card {
        padding: var(--space-5);
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .nav,
    .scroll-indicator,
    .theme-toggle {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: var(--space-8) 0;
    }

    .section {
        padding: var(--space-8) 0;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ===================================
   JoJo Name Animation (Automatic)
   =================================== */
.hero-name {
    position: relative;
}

.hero-name.jojo-flicker {
    animation: glitch 0.6s ease-in-out;
}

@keyframes glitch {
    0% {
        transform: translate(0);
        text-shadow: none;
    }
    10% {
        transform: translate(-3px, 2px) skewX(-2deg);
        text-shadow: 4px 0 0 rgba(255, 0, 0, 0.7), -4px 0 0 rgba(0, 255, 255, 0.7);
        clip-path: inset(20% 0 30% 0);
    }
    15% {
        transform: translate(3px, -1px) skewX(1deg);
        text-shadow: -3px 0 0 rgba(255, 0, 0, 0.7), 3px 0 0 rgba(0, 255, 255, 0.7);
        clip-path: inset(50% 0 10% 0);
    }
    20% {
        transform: translate(-2px, 0);
        text-shadow: 5px 0 0 rgba(255, 0, 0, 0.8), -5px 0 0 rgba(0, 255, 255, 0.8);
        clip-path: inset(10% 0 60% 0);
    }
    25% {
        transform: translate(0);
        text-shadow: none;
        clip-path: none;
    }
    35% {
        transform: translate(4px, 1px) skewX(3deg);
        text-shadow: -6px 0 0 rgba(255, 0, 0, 0.9), 6px 0 0 rgba(0, 255, 255, 0.9);
        clip-path: inset(40% 0 20% 0);
    }
    40% {
        transform: translate(-3px, -2px) skewX(-2deg);
        text-shadow: 4px 0 0 rgba(255, 0, 0, 0.7), -4px 0 0 rgba(0, 255, 255, 0.7);
        clip-path: inset(5% 0 70% 0);
    }
    45% {
        transform: translate(0);
        text-shadow: none;
        clip-path: none;
    }
    55% {
        transform: translate(2px, 1px);
        text-shadow: -5px 0 0 rgba(255, 0, 0, 0.8), 5px 0 0 rgba(0, 255, 255, 0.8);
        clip-path: inset(60% 0 5% 0);
    }
    60% {
        transform: translate(-4px, -1px) skewX(-3deg);
        text-shadow: 7px 0 0 rgba(255, 0, 0, 0.9), -7px 0 0 rgba(0, 255, 255, 0.9);
        clip-path: inset(25% 0 35% 0);
    }
    65% {
        transform: translate(0);
        text-shadow: none;
        clip-path: none;
    }
    75% {
        transform: translate(3px, 2px) skewX(2deg);
        text-shadow: -4px 0 0 rgba(255, 0, 0, 0.7), 4px 0 0 rgba(0, 255, 255, 0.7);
        clip-path: inset(45% 0 25% 0);
    }
    80% {
        transform: translate(-2px, 0);
        text-shadow: 3px 0 0 rgba(255, 0, 0, 0.6), -3px 0 0 rgba(0, 255, 255, 0.6);
        clip-path: inset(15% 0 55% 0);
    }
    85% {
        transform: translate(0);
        text-shadow: none;
        clip-path: none;
    }
    100% {
        transform: translate(0);
        text-shadow: none;
        clip-path: none;
    }
}


/* ===================================
   Pucci's Prime Numbers
   =================================== */
.prime-numbers {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-8);
}

/* ===================================
   Killer Queen & Bites the Dust
   =================================== */
.killer-queen-container {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
}

.killer-queen-video {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    width: 160px;
    height: auto;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: none;
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    /* Clip the top portion so it appears to emerge from below */
    clip-path: inset(100% 0 0 0);
}

.killer-queen-video.appear {
    animation: killerQueenEmerge 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes killerQueenEmerge {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20%);
        clip-path: inset(100% 0 0 0);
    }
    20% {
        opacity: 1;
    }
    60% {
        transform: translateX(-50%) translateY(-25%);
        clip-path: inset(0 0 0 0);
    }
    80% {
        transform: translateX(-50%) translateY(-30%);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(-27%);
        clip-path: inset(0 0 0 0);
    }
}

.btn-bites-dust {
    position: relative;
    z-index: 5;
    transition: all var(--transition-fast);
    overflow: visible;
}

.btn-bites-dust:hover {
    transform: translateY(-2px);
}

/* Bites the Dust Overlay */
.btd-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.btd-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.btd-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0;
}

.btd-overlay.active .btd-flash {
    animation: btdFlash 1.8s ease-out forwards;
}

@keyframes btdFlash {
    0% { opacity: 0; background: rgba(255, 255, 255, 0); }
    5% { opacity: 1; background: rgba(255, 255, 255, 1); }
    15% { opacity: 0.9; background: rgba(255, 255, 255, 1); }
    25% { opacity: 1; background: rgba(255, 255, 255, 1); }
    50% { opacity: 1; background: rgba(255, 255, 255, 1); }
    100% { opacity: 1; background: rgba(255, 255, 255, 1); }
}

.btd-explosion {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

/* Explosion particles */
.explosion-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    opacity: 0;
}

.btd-overlay.active .explosion-ring:nth-child(1) {
    animation: explosionBurst 0.8s ease-out 0.1s forwards;
    background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,255,255,0.6) 50%, transparent 70%);
}

.btd-overlay.active .explosion-ring:nth-child(2) {
    animation: explosionBurst 0.8s ease-out 0.2s forwards;
    background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.5) 50%, transparent 70%);
}

.btd-overlay.active .explosion-ring:nth-child(3) {
    animation: explosionBurst 0.8s ease-out 0.3s forwards;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.3) 50%, transparent 70%);
}

@keyframes explosionBurst {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        width: 250vmax;
        height: 250vmax;
        opacity: 0;
    }
}

/* Screen shake effect */
@keyframes screenShake {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-15px, -10px); }
    20% { transform: translate(15px, 10px); }
    30% { transform: translate(-12px, 12px); }
    40% { transform: translate(12px, -12px); }
    50% { transform: translate(-8px, 8px); }
    60% { transform: translate(8px, -8px); }
    70% { transform: translate(-5px, 5px); }
    80% { transform: translate(5px, -5px); }
    90% { transform: translate(-2px, 2px); }
}

body.screen-shake {
    animation: screenShake 0.6s ease-in-out;
}

/* Responsive Killer Queen */
@media (max-width: 768px) {
    .killer-queen-video {
        width: 120px;
    }
}

/* ===================================
   Bottom Menacing Symbols
   =================================== */
.bottom-menacing {
    position: fixed;
    bottom: -40px;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 900;
    z-index: 9999;
    pointer-events: none;
    animation: bottomMenacingRise 2.5s ease-out forwards;
    --start-rotation: 0deg;
    text-shadow:
        1px 1px 0 rgba(0, 0, 0, 0.3),
        0 0 8px currentColor;
}

@keyframes bottomMenacingRise {
    0% {
        bottom: -40px;
        opacity: 0;
        transform: rotate(var(--start-rotation)) scale(0.5);
    }
    20% {
        opacity: 1;
    }
    50% {
        transform: rotate(calc(var(--start-rotation) + 15deg)) scale(1.2);
    }
    70% {
        transform: rotate(calc(var(--start-rotation) - 5deg)) scale(1);
    }
    85% {
        opacity: 1;
        bottom: 120px;
    }
    100% {
        opacity: 0;
        bottom: 180px;
        transform: rotate(calc(var(--start-rotation) + 10deg)) scale(0.8);
    }
}
