/* ============================================
   MODERN PORTFOLIO STYLESHEET
   Inspired by smudge.ai design patterns
   ============================================ */

/* ----------- CSS Variables ----------- */
:root {
    /* Background Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: rgba(20, 20, 30, 0.8);
    --bg-card-hover: rgba(30, 30, 45, 0.9);

    /* Accent Colors */
    --accent-primary: #6366f1;
    --accent-secondary: #22d3ee;
    --accent-tertiary: #a855f7;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #22d3ee 50%, #a855f7 100%);
    --accent-glow: rgba(99, 102, 241, 0.3);

    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #22d3ee;

    /* Other Colors */
    --success: #22c55e;
    --warning: #eab308;
    --error: #ef4444;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-light: rgba(255, 255, 255, 0.15);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    /* Spacing */
    --section-padding: 100px;
    --container-width: 1200px;
    --container-padding: 24px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

/* ----------- MINIMAL THEME (Default) ----------- */
body.minimal-theme {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #141414;
    --bg-card: rgba(15, 15, 15, 0.9);
    --bg-card-hover: rgba(25, 25, 25, 0.95);

    --accent-primary: #ffffff;
    --accent-secondary: #e5e5e5;
    --accent-tertiary: #cccccc;
    --accent-gradient: linear-gradient(135deg, #ffffff 0%, #e5e5e5 100%);
    --accent-glow: rgba(255, 255, 255, 0.1);

    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --text-accent: #ffffff;

    --border-color: rgba(255, 255, 255, 0.06);
    --border-color-light: rgba(255, 255, 255, 0.1);
}

/* Hide colorful effects in minimal mode */
body.minimal-theme .bg-gradient,
body.minimal-theme .bg-grid {
    opacity: 0;
}

/* Reduce animations in minimal mode */
body.minimal-theme .animate-on-scroll {
    transition-duration: 0.3s;
}

/* Subtle styling for minimal mode */
body.minimal-theme .gradient-text {
    background: #ffffff;
    -webkit-background-clip: text;
    background-clip: text;
}

body.minimal-theme .nav-cta {
    background: #ffffff;
    color: #000000 !important;
}

body.minimal-theme .nav-cta:hover {
    background: #e5e5e5;
    box-shadow: none;
}

body.minimal-theme .btn-primary {
    background: #ffffff;
    color: #000000;
    box-shadow: none;
}

body.minimal-theme .btn-primary:hover {
    background: #e5e5e5;
    box-shadow: none;
}

body.minimal-theme .hero-badge {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

body.minimal-theme .badge-dot {
    background: #22c55e;
}

/* Terminal cursor in code window */
.code-content .cursor {
    animation: blink 1s step-end infinite;
    color: var(--text-primary);
}

.code-muted {
    color: var(--text-muted);
}

/* ----------- ENHANCED THEME (Toggled On) ----------- */
body.enhanced-theme .bg-gradient,
body.enhanced-theme .bg-grid {
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* ----------- Reset & Base ----------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

::selection {
    background: var(--accent-primary);
    color: white;
}

/* ----------- Background Effects ----------- */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 90% 10%, rgba(34, 211, 238, 0.1), transparent),
        radial-gradient(ellipse 50% 30% at 10% 90%, rgba(168, 85, 247, 0.1), transparent);
    pointer-events: none;
    z-index: 0;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* ----------- Typography ----------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
}

p {
    color: var(--text-secondary);
}

a {
    color: var(--text-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-primary);
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight {
    color: var(--accent-secondary);
    font-weight: 500;
}

/* ----------- Container ----------- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    position: relative;
    z-index: 1;
}

/* ----------- Navigation ----------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-base);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    background: var(--accent-primary);
    color: white !important;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast) !important;
}

.nav-cta:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px var(--accent-glow);
}

.nav-cta::after {
    display: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
}

/* ----------- Hero Section ----------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px var(--container-padding) 60px;
    gap: 60px;
    max-width: var(--container-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 16px;
}

.greeting {
    display: block;
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.name {
    display: block;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.subtitle-separator {
    color: var(--accent-primary);
    margin: 0 8px;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 520px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.hero-social {
    display: flex;
    gap: 16px;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.social-link:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: translateY(-3px);
}

/* Hero Visual - Code Window */
.hero-visual {
    flex: 1;
    max-width: 480px;
}

.code-window {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f57;
}

.dot.yellow {
    background: #febc2e;
}

.dot.green {
    background: #28c840;
}

.code-title {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.code-content {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-content code {
    display: block;
}

.code-keyword {
    color: #c792ea;
}

.code-type {
    color: #82aaff;
}

.code-function {
    color: #82aaff;
}

.code-string {
    color: #c3e88d;
}

.code-number {
    color: #f78c6c;
}

/* ----------- Buttons ----------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 20px -4px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px -4px var(--accent-glow);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color-light);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.btn-large {
    padding: 18px 36px;
    font-size: 1rem;
}

/* ----------- Sections ----------- */
.section {
    padding: var(--section-padding) 0;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 48px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent-primary);
    font-weight: 500;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
}

/* ----------- About Section ----------- */
.about-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.about-skills h3 {
    font-size: 1.1rem;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.skill-category h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    font-weight: 500;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.skill-tag:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

/* ----------- Experience Timeline ----------- */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-tertiary));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-bottom: 48px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -32px;
    top: 8px;
    width: 14px;
    height: 14px;
    background: var(--accent-primary);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 3px var(--accent-primary);
}

.timeline-marker.education {
    background: var(--accent-tertiary);
    box-shadow: 0 0 0 3px var(--accent-tertiary);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    backdrop-filter: blur(10px);
    transition: all var(--transition-base);
}

.timeline-content:hover {
    border-color: var(--accent-primary);
    transform: translateX(8px);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.timeline-header h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.timeline-company {
    color: var(--accent-secondary);
    font-weight: 500;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.timeline-details {
    list-style: none;
    margin: 20px 0;
}

.timeline-details li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.timeline-details li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

.timeline-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.timeline-tech span {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

/* Experience Highlight Sections */
.experience-highlight {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.experience-highlight:first-of-type {
    margin-top: 20px;
    padding-top: 0;
    border-top: none;
}

.experience-highlight h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-weight: 600;
}

.experience-highlight .timeline-details {
    margin: 0;
}

.experience-highlight .timeline-details li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.experience-highlight .timeline-details li strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ----------- Interests Section ----------- */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.interest-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
}

.interest-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -20px var(--accent-glow);
}

.interest-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.interest-card h3 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.interest-card p {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ----------- Gaming Section - Retro Terminal ----------- */
.retro-terminal {
    max-width: 600px;
    margin: 0 auto;
    background: #0a0a0a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 0 0 4px #1a1a1a,
        0 0 0 6px #333,
        0 0 40px rgba(0, 255, 0, 0.1),
        inset 0 0 100px rgba(0, 255, 0, 0.03);
    position: relative;
}

/* CRT screen curve effect */
.retro-terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
    z-index: 5;
}

/* Scanlines */
.retro-terminal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.15) 2px,
            rgba(0, 0, 0, 0.15) 4px);
    pointer-events: none;
    z-index: 6;
}

.terminal-header {
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #333;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red {
    background: #ff5f56;
}

.terminal-dot.yellow {
    background: #ffbd2e;
}

.terminal-dot.green {
    background: #27ca40;
}

.terminal-title {
    margin-left: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #888;
}

.terminal-screen {
    padding: 24px;
    min-height: 400px;
    background: #0a0f0a;
    position: relative;
}

.terminal-line {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #00ff41;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    white-space: nowrap;
}

.terminal-line.output {
    padding-left: 20px;
    color: #00dd35;
}

.terminal-line .prompt {
    color: #00ff41;
    font-weight: bold;
}

.terminal-line .cursor {
    animation: blink 1s step-end infinite;
    color: #00ff41;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* Flicker effect on hover */
.retro-terminal:hover .terminal-screen {
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.98;
    }

    100% {
        opacity: 1;
    }
}

/* Clickable game entries */
.game-entry {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.game-entry:hover {
    color: #00ff41 !important;
    text-shadow: 0 0 20px rgba(0, 255, 65, 0.8), 0 0 40px rgba(0, 255, 65, 0.4);
    padding-left: 30px;
}

.game-entry:hover::before {
    content: '>';
    position: absolute;
    left: 8px;
    animation: blink 0.5s step-end infinite;
}

.game-entry:active {
    color: #ffffff !important;
}

/* Game launch overlay */
.game-launch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 10, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 0 0 12px 12px;
}

.game-launch-overlay.active {
    display: flex;
}

.launch-content {
    text-align: center;
    color: #00ff41;
    font-family: 'JetBrains Mono', monospace;
}

.launch-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid #003300;
    border-top: 3px solid #00ff41;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.launch-text {
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.launch-text span {
    color: #00ff88;
    font-weight: bold;
}

.launch-progress {
    width: 200px;
    height: 8px;
    background: #003300;
    border-radius: 4px;
    margin: 0 auto 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00ff41, #00ff88);
    border-radius: 4px;
    animation: loading 2s ease-in-out forwards;
}

@keyframes loading {
    0% {
        width: 0%;
    }

    20% {
        width: 20%;
    }

    50% {
        width: 60%;
    }

    80% {
        width: 85%;
    }

    100% {
        width: 100%;
    }
}

.launch-status {
    font-size: 0.8rem;
    color: #00aa30;
    animation: statusBlink 0.5s ease-in-out infinite alternate;
}

@keyframes statusBlink {
    0% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .retro-terminal {
        margin: 0 -20px;
        border-radius: 0;
    }

    .terminal-line {
        font-size: 0.75rem;
    }
}

/* ----------- Blog Section ----------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.blog-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
}

.blog-card:hover::before {
    transform: scaleX(1);
}

.blog-card-content {
    flex: 1;
}

.blog-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.blog-date,
.blog-read-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.blog-card h3 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    transition: color var(--transition-fast);
}

.blog-card:hover h3 {
    color: var(--accent-primary);
}

.blog-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.blog-tags span {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
}

.blog-card-arrow {
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin-top: 16px;
    transition: transform var(--transition-fast);
}

.blog-card:hover .blog-card-arrow {
    transform: translateX(8px);
}

/* ----------- Contact Section ----------- */
.contact {
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-text {
    font-size: 1.15rem;
    margin-bottom: 32px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 12px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.contact-link svg {
    width: 18px;
    height: 18px;
}

.contact-link:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* ----------- Footer ----------- */
.footer {
    text-align: center;
    padding: 40px var(--container-padding);
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.footer p {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.footer-note {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ----------- Animations ----------- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

/* ----------- Responsive Design ----------- */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 140px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-description {
        max-width: 100%;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-social {
        justify-content: center;
    }

    .hero-visual {
        max-width: 100%;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .interests-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .interests-grid {
        grid-template-columns: 1fr;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline-marker {
        left: -24px;
    }

    .timeline-content {
        padding: 20px;
    }

    .timeline-header {
        flex-direction: column;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .code-window {
        display: none;
    }
}

/* ----------- Theme Toggle (Fun Mode Nav Link) ----------- */
.theme-toggle-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary) !important;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    cursor: pointer;
    text-decoration: none;
}

.theme-toggle-link:hover {
    color: var(--text-primary) !important;
}

.theme-toggle-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-base);
}

.theme-toggle-link:hover::after {
    width: 100%;
}

.theme-toggle-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.theme-toggle-link:hover .theme-toggle-icon {
    animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

/* Active state (enhanced mode) */
body.enhanced-theme .theme-toggle-link {
    color: var(--accent-primary) !important;
}

body.enhanced-theme .theme-toggle-link .theme-toggle-icon {
    animation: bounce 1s ease infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

/* Mobile: hide text */
@media (max-width: 768px) {
    .theme-toggle-text {
        display: none;
    }
}

/* ----------- Scroll Indicator ----------- */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.7;
    animation: fadeInUp 1s ease 1s both;
}

.scroll-indicator-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
}

.scroll-indicator-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: rotate(45deg) translateY(0);
        opacity: 1;
    }

    50% {
        transform: rotate(45deg) translateY(8px);
        opacity: 0.5;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 0.7;
        transform: translateX(-50%) translateY(0);
    }
}

/* Hide scroll indicator when scrolled */
.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Orbiting Planets Effect */
.orbit-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    pointer-events: none;
    opacity: 0;
    z-index: -1;
}

.orbit-container.active {
    animation: orbitAppear 1s ease forwards;
}

.orbit-container.hidden {
    opacity: 0 !important;
    transition: opacity 0.5s ease;
}

/* Orbit paths */
.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.orbit-1 {
    width: 80px;
    height: 80px;
    animation: orbitPath 8s linear infinite;
}

.orbit-2 {
    width: 100px;
    height: 100px;
    animation: orbitPath 12s linear infinite reverse;
}

.orbit-3 {
    width: 120px;
    height: 120px;
    animation: orbitPath 16s linear infinite;
}

/* Orbiting planets/dots */
.planet {
    position: absolute;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.6;
}

.orbit-1 .planet {
    width: 4px;
    height: 4px;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(99, 102, 241, 0.8);
}

.orbit-2 .planet {
    width: 3px;
    height: 3px;
    top: 50%;
    right: -1.5px;
    transform: translateY(-50%);
    background: rgba(34, 211, 238, 0.7);
}

.orbit-3 .planet {
    width: 2px;
    height: 2px;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(168, 85, 247, 0.6);
}

/* Minimal theme - white dots */
body.minimal-theme .planet {
    background: rgba(255, 255, 255, 0.5);
}

body.minimal-theme .orbit {
    border-color: rgba(255, 255, 255, 0.02);
}

@keyframes orbitAppear {
    from {
        opacity: 0;
        transform: translateX(-50%) scale(0.5);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

@keyframes orbitPath {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ----------- Interactive Terminal ----------- */
.interactive-terminal {
    max-width: 560px;
    width: 100%;
}

.interactive-terminal .terminal-body {
    padding: 24px;
    min-height: 420px;
    max-height: 420px;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
}

.terminal-output {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 12px;
}

.terminal-output .terminal-line {
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.terminal-output .cmd-highlight {
    color: var(--accent-secondary);
    font-weight: 500;
}

.terminal-output .cmd-prompt {
    color: var(--text-muted);
}

.terminal-output .cmd-user {
    color: var(--accent-primary);
}

.terminal-output .cmd-success {
    color: #22c55e;
}

.terminal-output .cmd-error {
    color: #ef4444;
}

.terminal-output .cmd-heading {
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 8px;
}

.terminal-output .cmd-list-item {
    padding-left: 16px;
    color: var(--text-secondary);
}

.terminal-output .cmd-list-item::before {
    content: '▸ ';
    color: var(--accent-primary);
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.terminal-prompt {
    color: var(--accent-primary);
    font-weight: 600;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    caret-color: var(--accent-primary);
}

.terminal-input::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

/* Custom scrollbar for terminal */
.terminal-output::-webkit-scrollbar {
    width: 6px;
}

.terminal-output::-webkit-scrollbar-track {
    background: transparent;
}

.terminal-output::-webkit-scrollbar-thumb {
    background: var(--border-color-light);
    border-radius: 3px;
}

/* Minimal theme terminal colors */
body.minimal-theme .terminal-output .cmd-highlight {
    color: #ffffff;
}

body.minimal-theme .terminal-output .cmd-success {
    color: #22c55e;
}