@import url('https://fonts.googleapis.com/css2?family=Righteous&family=Space+Mono:wght@400;700&family=DM+Sans:wght@400;500;700&display=swap');

:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #151937;
    --bg-card: #1e2449;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --accent-1: #ff6b9d;
    --accent-2: #00d4ff;
    --accent-3: #ffd93d;
    --accent-4: #6bcf7f;
    --gradient-1: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
    --gradient-2: linear-gradient(135deg, #00d4ff 0%, #0984e3 100%);
    --gradient-3: linear-gradient(135deg, #ffd93d 0%, #f39c12 100%);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg-primary); color: var(--text-primary); overflow-x: hidden; transition: background 0.3s ease, color 0.3s ease; }

/* ── Background animation ── */
.bg-animation { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.4; pointer-events: none; }
.floating-shape { position: absolute; border-radius: 50%; filter: blur(60px); animation: float 20s infinite ease-in-out; }
.shape-1 { width: 300px; height: 300px; background: var(--accent-1); top: 10%; left: 10%; animation-delay: 0s; }
.shape-2 { width: 250px; height: 250px; background: var(--accent-2); top: 60%; right: 10%; animation-delay: 5s; }
.shape-3 { width: 200px; height: 200px; background: var(--accent-3); bottom: 20%; left: 50%; animation-delay: 10s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(50px, -50px) scale(1.1); }
    66%       { transform: translate(-30px, 30px) scale(0.9); }
}

/* ── Theme toggle ── */
.theme-toggle {
    position: fixed; top: 30px; right: 30px; z-index: 1000;
    background: var(--bg-card); border: none;
    width: 60px; height: 60px; border-radius: 50%;
    cursor: pointer; box-shadow: var(--shadow);
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s ease, background 0.3s ease;
}
.theme-toggle:hover { transform: scale(1.1) rotate(15deg); }
.theme-toggle svg { width: 30px; height: 30px; fill: var(--text-primary); }

/* ── Layout ── */
.container { max-width: 1400px; margin: 0 auto; padding: 0 40px; position: relative; z-index: 1; }

/* ── Header ── */
header { padding: 120px 0 80px; text-align: center; position: relative; }
.glitch-wrapper { position: relative; display: inline-block; }

h1 {
    font-family: 'Righteous', cursive;
    font-size: clamp(3rem, 8vw, 6rem);
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease infinite; background-size: 200% 200%;
    margin-bottom: 20px; line-height: 1.1;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

.subtitle { font-family: 'Space Mono', monospace; font-size: clamp(1rem, 2vw, 1.3rem); color: var(--text-secondary); margin-bottom: 30px; letter-spacing: 2px; }
.typewriter { display: inline-block; border-right: 3px solid var(--accent-2); animation: blink 0.7s infinite; }

@keyframes blink { 50% { border-color: transparent; } }

.cta-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }

/* ── Buttons ── */
.btn {
    padding: 16px 40px; font-family: 'Space Mono', monospace; font-size: 14px; font-weight: 700;
    text-decoration: none; border-radius: 50px; transition: all 0.3s ease;
    position: relative; overflow: hidden; text-transform: uppercase; letter-spacing: 1px;
}
.btn-primary { background: var(--gradient-1); color: white; box-shadow: 0 10px 30px rgba(255, 107, 157, 0.3); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(255, 107, 157, 0.5); }
.btn-secondary { background: transparent; color: var(--text-primary); border: 2px solid var(--accent-2); }
.btn-secondary:hover { background: var(--accent-2); color: #0a0e27; transform: translateY(-3px); }

/* ── Sections ── */
section { padding: 80px 0; position: relative; }
.section-title { font-family: 'Righteous', cursive; font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 60px; text-align: center; position: relative; }
.section-title::after { content: ''; display: block; width: 100px; height: 5px; background: var(--gradient-2); margin: 20px auto 0; border-radius: 10px; }

/* ── Skills ── */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 60px; }
.skill-card {
    background: var(--bg-card); padding: 40px; border-radius: 20px; box-shadow: var(--shadow);
    position: relative; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}
.skill-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--gradient-1); transform: scaleX(0); transition: transform 0.3s ease; }
.skill-card:hover::before { transform: scaleX(1); }
.skill-card:hover { transform: translateY(-10px); box-shadow: 0 30px 80px rgba(0,0,0,0.4); }
.skill-card:nth-child(2)::before { background: var(--gradient-2); }
.skill-card:nth-child(3)::before { background: var(--gradient-3); }
.skill-icon { font-size: 3rem; margin-bottom: 20px; }
.skill-card h3 { font-family: 'Righteous', cursive; font-size: 1.8rem; margin-bottom: 20px; color: var(--text-primary); }
.skill-list { list-style: none; }
.skill-list li { padding: 8px 0; color: var(--text-secondary); position: relative; padding-left: 25px; }
.skill-list li::before { content: '▹'; position: absolute; left: 0; color: var(--accent-2); font-size: 1.2rem; }

/* ── Projects ── */
.projects-grid { display: grid; gap: 40px; margin-top: 60px; }
.project-card {
    background: var(--bg-card); border-radius: 20px; overflow: hidden;
    box-shadow: var(--shadow); transition: transform 0.3s ease, box-shadow 0.3s ease; position: relative;
}
.project-card:hover { transform: translateY(-5px); box-shadow: 0 30px 80px rgba(0,0,0,0.4); }
.project-featured { border: 3px solid var(--accent-1); }
.featured-badge {
    position: absolute; top: 20px; right: 20px; background: var(--gradient-1); color: white;
    padding: 8px 20px; border-radius: 20px; font-family: 'Space Mono', monospace;
    font-size: 12px; font-weight: 700; text-transform: uppercase; z-index: 10;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.project-content { padding: 40px; }
.project-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 20px; gap: 20px; }
.project-card h3 { font-family: 'Righteous', cursive; font-size: 2rem; color: var(--text-primary); margin-bottom: 10px; }
.project-meta { font-family: 'Space Mono', monospace; font-size: 0.9rem; color: var(--accent-2); margin-bottom: 20px; }
.project-description { color: var(--text-secondary); line-height: 1.8; margin-bottom: 20px; }
.project-highlights { list-style: none; margin: 20px 0; }
.project-highlights li { padding: 10px 0; color: var(--text-secondary); position: relative; padding-left: 30px; }
.project-highlights li::before { content: '→'; position: absolute; left: 0; color: var(--accent-1); font-weight: 700; }
.tech-stack { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.tech-tag {
    background: rgba(255,107,157,0.1); color: var(--accent-1); padding: 8px 16px;
    border-radius: 20px; font-size: 0.85rem; font-family: 'Space Mono', monospace;
    border: 1px solid rgba(255,107,157,0.3);
}

/* ── Timeline ── */
.timeline { position: relative; padding: 40px 0; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; background: var(--gradient-2); transform: translateX(-50%); }
.timeline-item { position: relative; margin-bottom: 80px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.timeline-item:nth-child(even) .timeline-content { order: 2; }
.timeline-content { background: var(--bg-card); padding: 30px; border-radius: 20px; box-shadow: var(--shadow); position: relative; }
.timeline-dot { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 20px; height: 20px; background: var(--accent-2); border-radius: 50%; border: 5px solid var(--bg-primary); z-index: 10; }
.timeline-content h3 { font-family: 'Righteous', cursive; font-size: 1.5rem; color: var(--text-primary); margin-bottom: 10px; }
.timeline-company { color: var(--accent-2); font-weight: 700; margin-bottom: 5px; }
.timeline-date { font-family: 'Space Mono', monospace; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 15px; }
.timeline-description { color: var(--text-secondary); line-height: 1.6; }

/* ── Contact ── */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-top: 60px; }
.contact-card {
    background: var(--bg-card); padding: 40px; border-radius: 20px; text-align: center;
    box-shadow: var(--shadow); transition: transform 0.3s ease;
    text-decoration: none; color: var(--text-primary); position: relative; overflow: hidden;
}
.contact-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--gradient-1); transform: scaleX(0); transition: transform 0.3s ease; }
.contact-card:hover::before { transform: scaleX(1); }
.contact-card:hover { transform: translateY(-5px); }
.contact-icon { font-size: 3rem; margin-bottom: 20px; }
.contact-card h3 { font-family: 'Righteous', cursive; font-size: 1.3rem; margin-bottom: 10px; }
.contact-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* ── Footer ── */
footer { text-align: center; padding: 60px 0; background: var(--bg-secondary); margin-top: 100px; }
footer p { color: var(--text-secondary); font-family: 'Space Mono', monospace; }

/* ── Theme icon visibility ── */
.moon-icon { display: none; }

/* ── Header bio ── */
.header-bio { color: var(--text-secondary); max-width: 760px; margin: 20px auto; line-height: 1.75; }

/* ── Contact section ── */
.contact-intro { text-align: center; color: var(--text-secondary); max-width: 600px; margin: 0 auto 40px; line-height: 1.8; }
.contact-card--static { pointer-events: none; }

/* ── Footer ── */
.footer-subtitle { margin-top: 10px; font-size: 0.85rem; }

/* ── Animations ── */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ── */
@media (max-width: 968px) {
    .timeline::before { left: 30px; }
    .timeline-item { grid-template-columns: 1fr; padding-left: 60px; }
    .timeline-item:nth-child(even) .timeline-content { order: 1; }
    .timeline-dot { left: 30px; }
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    header { padding: 80px 0 60px; }
    .cta-buttons { flex-direction: column; align-items: center; }
    .btn { width: 100%; max-width: 300px; }
    section { padding: 60px 0; }
    .theme-toggle { top: 20px; right: 20px; width: 50px; height: 50px; }
}
