/* ============================================
   CSS Custom Properties — Pure Black & White
   ============================================ */
:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --bg-card-hover: #1a1a1a;
    --bg-nav: rgba(0, 0, 0, 0.9);
    --accent: #ffffff;
    --accent-light: #f5f5f5;
    --accent-glow: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.25);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --container-max: 1200px;
    --section-padding: 120px;
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --shadow-card-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(255, 255, 255, 0.06);

    --cv-bg: #ffffff;
    --cv-text: #000000;
    --cv-hover: #e0e0e0;
}

/* ============================================
   Light Theme
   ============================================ */

html[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f7f7f7;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f1f1;
    --bg-nav: rgba(255, 255, 255, 0.90);

    --accent: #111111;
    --accent-light: #222222;
    --accent-glow: rgba(0, 0, 0, 0.05);

    --text-primary: #111111;
    --text-secondary: #5c5c5c;
    --text-muted: #888888;

    --border: rgba(0, 0, 0, 0.10);
    --border-hover: rgba(0, 0, 0, 0.25);

    --shadow-card-hover:
        0 20px 25px -5px rgba(0, 0, 0, 0.12),
        0 10px 10px -5px rgba(0, 0, 0, 0.08);

    --shadow-glow:
        0 0 30px rgba(0, 0, 0, 0.06);

    --cv-bg: #111111;
    --cv-text: #ffffff;
    --cv-hover: #2a2a2a;
}



*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
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.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
.accent { color: var(--accent); }

/* ============================================
   Social Sidebar — Fixed Left
   ============================================ */
.social-sidebar {
    position: fixed;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--text-muted);
    transition: all var(--transition-base);
    position: relative;
}

.social-link svg {
    width: 20px;
    height: 20px;
    transition: all var(--transition-base);
}

.social-link:hover {
    color: var(--text-primary);
    background: var(--accent-glow);
    transform: translateY(-3px);
}

.social-link:hover svg {
    transform: scale(1.1);
}

.social-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--border), transparent);
    margin-top: 8px;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes scrollBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

.hero-content { animation: fadeInUp 1s ease-out; }
.hero-badge { animation: fadeInUp 0.8s ease-out 0.2s both; }
.hero-title { animation: fadeInUp 0.8s ease-out 0.4s both; }
.hero-subtitle { animation: fadeInUp 0.8s ease-out 0.6s both; }
.hero-description { animation: fadeInUp 0.8s ease-out 0.8s both; }
.hero-buttons { animation: fadeInUp 0.8s ease-out 1s both; }

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

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-base);
    background: transparent;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 14px;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo-bracket { color: var(--text-muted); font-weight: 400; }

.nav-menu { display: flex; justify-content: center; gap: 8px; }

.nav-link {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.nav-link:hover { color: var(--text-primary); background: var(--accent-glow); }

.nav-cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--cv-text);
    background: var(--cv-bg);
    padding: 10px 20px;
    border-radius: 10px;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.nav-cv-btn:hover {
    background: var(--cv-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.cv-icon { width: 18px; height: 18px; stroke: currentColor; }



/* ============================================
   Theme Toggle
   ============================================ */

.theme-toggle {
    width: 42px;
    height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    color: var(--text-primary);
    background: var(--bg-card);

    border: 1px solid var(--border);
    border-radius: 10px;

    cursor: pointer;

    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);

    transform: translateY(-1px);

    box-shadow: var(--shadow-glow);
}

.theme-toggle:active {
    transform: scale(0.94);
}

.theme-icon {
    width: 21px;
    height: 21px;
}


/* Dark mode = sun visible */

html[data-theme="dark"] .theme-icon-sun {
    display: block;
}

html[data-theme="dark"] .theme-icon-moon {
    display: none;
}


/* Light mode = moon visible */

html[data-theme="light"] .theme-icon-sun {
    display: none;
}

html[data-theme="light"] .theme-icon-moon {
    display: block;
}


/* Smooth theme transition */

body,
.navbar,
.hero,
.about,
.skills,
.projects,
.contact,
.footer,
.skill-card,
.project-card,
.contact-item {
    transition:
        background-color 0.3s ease,
        background 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease;
}


/* GitHub icon must become black in light mode */

html[data-theme="light"] .github-skill-icon {
    filter: none;
}

.hamburger { display: none; cursor: pointer; padding: 5px; }
.bar { display: block; width: 24px; height: 2px; margin: 5px auto; background-color: var(--text-primary); border-radius: 2px; transition: all var(--transition-fast); }
.hamburger.active .bar:nth-child(1) { transform: rotate(-45deg) translate(-5px, 5px); }
.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(3) { transform: rotate(45deg) translate(-5px, -5px); }

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 24px 80px;
    position: relative;
    background: var(--bg-primary);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(255,255,255,0.02) 0%, transparent 50%), radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.015) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content { max-width: 800px; position: relative; z-index: 1; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-glow);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 50px;
    margin-bottom: 32px;
}

.badge-dot { width: 8px; height: 8px; background: var(--text-primary); border-radius: 50%; animation: pulse 2s infinite; }

.hero-title { font-family: var(--font-display); font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; line-height: 1.1; margin-bottom: 20px; letter-spacing: -2px; }
.hero-subtitle { font-family: var(--font-display); font-size: clamp(1rem, 2.5vw, 1.35rem); font-weight: 400; color: var(--text-secondary); margin-bottom: 24px; line-height: 1.5; }
.separator { color: var(--text-muted); margin: 0 8px; }
.hero-description { font-size: 1.125rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto 40px; line-height: 1.8; }

.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 12px;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
}

.btn-icon { width: 20px; height: 20px; }

.btn-primary { background: var(--text-primary); color: var(--bg-primary); box-shadow: 0 4px 14px rgba(255,255,255,0.15); }
.btn-primary:hover { background: var(--accent-light); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255,255,255,0.25); }
.btn-secondary { background: transparent; color: var(--text-primary); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--text-primary); color: var(--text-primary); background: var(--accent-glow); transform: translateY(-2px); }

.hero-scroll { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); }
.scroll-indicator { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-muted); transition: color var(--transition-fast); }
.scroll-indicator:hover { color: var(--text-primary); }
.scroll-text { font-family: var(--font-display); font-size: 0.75rem; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; }
.scroll-arrow { width: 20px; height: 20px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); animation: scrollBounce 2s infinite; }

/* ============================================
   Section Header
   ============================================ */
.section-header { margin-bottom: 60px; }
.section-tag { display: inline-block; font-family: var(--font-display); font-size: 0.875rem; font-weight: 600; color: var(--text-muted); margin-bottom: 12px; letter-spacing: 1px; }
.section-title { font-family: var(--font-display); font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; color: var(--text-primary); margin-bottom: 16px; }
.section-line { width: 60px; height: 3px; background: var(--text-primary); border-radius: 2px; }

/* ============================================
   About Section
   ============================================ */
.about { padding: var(--section-padding) 0; background: var(--bg-secondary); }
.about-content { display: grid; grid-template-columns: 320px 1fr; gap: 60px; align-items: start; }

.about-image-wrapper { display: flex; justify-content: center; }
.about-image-border { position: relative; width: 280px; height: 280px; border-radius: 50%; padding: 4px; background: linear-gradient(135deg, #333 0%, #111 50%, #333 100%); transition: all var(--transition-base); }
.about-image-border:hover { background: linear-gradient(135deg, #555 0%, #222 50%, #555 100%); transform: scale(1.02); }
.about-image { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 3px solid var(--bg-secondary); filter: grayscale(30%); transition: filter var(--transition-base); }
.about-image-border:hover .about-image { filter: grayscale(0%); }

.about-text { display: flex; flex-direction: column; gap: 20px; }
.about-paragraph { font-size: 1.0625rem; color: var(--text-secondary); line-height: 1.8; }
.about-paragraph strong { color: var(--text-primary); font-weight: 600; }
.about-paragraph.highlight { background: var(--accent-glow); border: 1px solid var(--border); border-radius: 12px; padding: 20px 24px; margin-top: 8px; }
.highlight-icon { font-size: 1.5rem; margin-right: 8px; display: inline-block; animation: float 3s ease-in-out infinite; }

/* ============================================
   Skills Section
   ============================================ */
.skills { padding: var(--section-padding) 0; background: var(--bg-primary); }
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.skill-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 32px 24px; text-align: center; transition: all var(--transition-base); cursor: default; }
.skill-card:hover { border-color: var(--border-hover); transform: translateY(-6px); box-shadow: var(--shadow-card-hover); background: var(--bg-card-hover); }

.skill-icon { width: 56px; height: 56px; background: var(--accent-glow); border: 1px solid var(--border); border-radius: 14px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; color: var(--text-primary); }
.skill-icon svg {
    color: var(--text-primary);
}

.skill-icon img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    display: block;
}

.skill-icon img.github-skill-icon {
    filter: invert(1);
}
.skill-name { display: block; font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.skill-level { display: block; font-size: 0.8125rem; color: var(--text-muted); font-weight: 500; }

/* ============================================
   Projects Section
   ============================================ */
.projects { padding: var(--section-padding) 0; background: var(--bg-secondary); }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.project-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 28px; transition: all var(--transition-base); display: flex; flex-direction: column; height: 100%; }
.project-card:hover { border-color: var(--border-hover); transform: translateY(-8px); box-shadow: var(--shadow-card-hover); background: var(--bg-card-hover); }

.project-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.project-folder svg { width: 40px; height: 40px; color: var(--text-primary); stroke-width: 1.5; }
.project-link svg { width: 20px; height: 20px; color: var(--text-muted); transition: all var(--transition-fast); }
.project-link:hover svg { color: var(--text-primary); transform: translate(2px, -2px); }

.project-title { font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; color: var(--text-primary); margin-bottom: 12px; }
.project-description { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 20px; flex-grow: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-family: var(--font-display); font-size: 0.75rem; font-weight: 500; color: var(--text-secondary); background: var(--accent-glow); border: 1px solid var(--border); padding: 5px 12px; border-radius: 6px; }

/* ============================================
   Contact Section
   ============================================ */
.contact { padding: var(--section-padding) 0; background: var(--bg-primary); }
.contact-content { max-width: 700px; margin: 0 auto; text-align: center; }
.contact-heading { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; color: var(--text-primary); margin-bottom: 16px; }
.contact-text { font-size: 1.0625rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 48px; }
.contact-links { display: flex; flex-direction: column; gap: 16px; max-width: 450px; margin: 0 auto; }

.contact-item { display: flex; align-items: center; gap: 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 20px 24px; transition: all var(--transition-base); text-align: left; }
.contact-item:hover { border-color: var(--border-hover); transform: translateX(8px); box-shadow: var(--shadow-glow); background: var(--bg-card-hover); }

.contact-icon { width: 48px; height: 48px; background: var(--accent-glow); border: 1px solid var(--border); border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-icon svg { width: 22px; height: 22px; color: var(--text-primary); }

.contact-detail { display: flex; flex-direction: column; }
.contact-label { font-family: var(--font-display); font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px; }
.contact-value { font-size: 1rem; font-weight: 500; color: var(--text-primary); }

/* ============================================
   Footer
   ============================================ */
.footer { padding: 40px 0; background: var(--bg-secondary); border-top: 1px solid var(--border); }
.footer-content { text-align: center; }
.footer-text { font-family: var(--font-display); font-size: 0.9375rem; color: var(--text-secondary); margin-bottom: 8px; }
.footer-sub { font-size: 0.8125rem; color: var(--text-muted); }

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .skills-grid { grid-template-columns: repeat(3, 1fr); }
    .social-sidebar { display: none; }
}

@media (max-width: 768px) {
    :root { --section-padding: 80px; }

    .nav-container { display: flex; justify-content: space-between; }
    .nav-menu { position: fixed; top: 0; right: -100%; width: 70%; max-width: 300px; height: 100vh; background: var(--bg-secondary); flex-direction: column; align-items: center; justify-content: center; gap: 0; transition: right var(--transition-base); border-left: 1px solid var(--border); padding: 80px 0; }
    .nav-menu.active { right: 0; }
    .nav-link { font-size: 1.125rem; padding: 16px 24px; width: 100%; text-align: center; }
    .nav-cv-btn { display: none; }
    .hamburger { display: block; z-index: 1001; }

    .hero { padding: 100px 20px 60px; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .btn { width: 100%; max-width: 280px; justify-content: center; }
    .separator { display: none; }
    .hero-subtitle { display: flex; flex-direction: column; gap: 4px; }

    .about-content { grid-template-columns: 1fr; gap: 40px; }
    .about-image-border { width: 220px; height: 220px; }

    .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: 1fr; }
    .contact-item:hover { transform: translateX(4px); }
}

@media (max-width: 480px) {
    .about-image-border { width: 180px; height: 180px; }
    .skills-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .skill-card { padding: 24px 16px; }
    .skill-icon { width: 48px; height: 48px; font-size: 1rem; }
    .project-card { padding: 22px; }
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }
::selection { background: rgba(255, 255, 255, 0.15); color: var(--text-primary); }


html[data-theme="light"] .hero::before {
    background:
        radial-gradient(
            ellipse at 20% 50%,
            rgba(0, 0, 0, 0.018) 0%,
            transparent 50%
        ),
        radial-gradient(
            ellipse at 80% 20%,
            rgba(0, 0, 0, 0.012) 0%,
            transparent 50%
        );
}


/* ============================================
   Theme Toggle - Mobile
   ============================================ */

@media (max-width: 768px) {
    .theme-toggle {
        margin-left: auto;
        z-index: 1002;
    }
}
