/* import components */
@import url('./components/navbar.css');
@import url('./components/hero.css');
@import url('./components/about.css');
@import url('./components/footer.css');
@import url('./components/skills.css');
@import url('./components/project.css');
@import url('./components/contact.css');
@import url('./components/animate.css');

/* Theme — dark default, monochrome */
:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #232323;
    --bg-elevated: #2c2c2c;

    --text-primary: #e8e8e8;
    --text-secondary: #888888;
    --text-tertiary: #5a5a5a;

    --border: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.4);

    --accent: #e0e0e0;
    --accent-soft: rgba(255, 255, 255, 0.05);
    --accent-hover: rgba(255, 255, 255, 0.1);

    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 100px;
}

[data-theme="light"] {
    --bg-primary: #f5f5f5;
    --bg-secondary: #eaeaea;
    --bg-elevated: #ffffff;

    --text-primary: #1a1a1a;
    --text-secondary: #5a5a5a;
    --text-tertiary: #888888;

    --border: rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15);

    --accent: #2c2c2c;
    --accent-soft: rgba(0, 0, 0, 0.05);
    --accent-hover: rgba(0, 0, 0, 0.1);
}

/* Global */
html {
    scroll-behavior: smooth;
}

html,
body {
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    transition: background-color 0.4s ease, color 0.4s ease;
    padding-top: 64px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

[id] {
    scroll-margin-top: 64px;
}

p {
    color: var(--text-secondary);
}

p strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Theme Toggle */
.theme-toggle {
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
    background: var(--accent-soft);
    transform: scale(1.08);
}

.theme-toggle i {
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: color 0.25s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle:hover i {
    color: var(--accent);
}

[data-theme="dark"] .theme-toggle i {
    transform: rotate(180deg);
}

/* Socials */
.socials {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.socials:hover {
    color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Section labels */
.section-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
}

/* Text accent */
.text-accent {
    color: var(--accent);
}

/* Gradient name — light theme version */
[data-theme="light"] .hero__name {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-tertiary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Tech tags on project cards */
.tech-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    color: var(--accent);
    letter-spacing: 0.02em;
}

/* Skeleton loader */
.skeleton-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-primary);
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.skeleton-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.skeleton-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    height: 80px;
}

.skeleton-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 80px);
}

.skeleton-bone {
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.skeleton-bone::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, var(--accent-soft) 50%, transparent 100%);
    animation: shimmer 1.5s ease infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Theme transition overlay */
.theme-overlay {
    position: fixed;
    inset: 0;
    z-index: 9990;
    background: var(--bg-primary);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.theme-overlay.active {
    opacity: 1;
}

/* Scroll progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--accent);
    z-index: 1040;
    transition: width 0.1s linear;
}

/* Copy email tooltip */
.email-link {
    position: relative;
    cursor: pointer;
    border: none;
}

.email-link .copy-hint {
    margin-left: 4px;
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.email-link:hover .copy-hint {
    opacity: 1;
}

.email-link.copied::after {
    content: 'Copied!';
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--bg-primary);
    background: var(--accent);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    animation: tooltip-fade 1.5s ease forwards;
}

@keyframes tooltip-fade {
    0% { opacity: 0; transform: translateX(-50%) translateY(4px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

/* Responsive */
@media (max-width: 767px) {
    body {
        padding-top: 56px;
    }

    [id] {
        scroll-margin-top: 56px;
    }
}
