:root {
    --bg-main: #f2f2f7;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-fallback: #ffffff;
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --accent-blue: #0071e3;
    --accent-hover: #005bb5;
    --orb-opacity: 0.5;
    --badge-bg: rgba(52, 199, 89, 0.15);
    --badge-text: #248a3d;
}

[data-theme="dark"] {
    --bg-main: #000000;
    --glass-bg: rgba(28, 28, 30, 0.75);
    --glass-fallback: #1c1c1e;
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    --text-primary: #f5f5f7;
    --text-secondary: #8e8e93;
    --accent-blue: #0a84ff;
    --accent-hover: #409cff;
    --orb-opacity: 0.35;
    --badge-bg: rgba(48, 209, 88, 0.2);
    --badge-text: #30d158;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    background-color: var(--bg-main);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    -webkit-filter: blur(80px);
    z-index: 0;
    opacity: var(--orb-opacity);
    animation: float 12s ease-in-out infinite alternate;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.orb-1 { width: 350px; height: 350px; background: #0071e3; top: -50px; left: -50px; }
.orb-2 { width: 400px; height: 400px; background: #af52de; bottom: -100px; right: -50px; animation-delay: -4s; }
.orb-3 { width: 300px; height: 300px; background: #5856d6; top: 35%; left: 25%; animation-delay: -7s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 40px) scale(1.1); }
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: auto;
}

header {
    position: relative;
    background-color: var(--glass-fallback);
    background: var(--glass-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--glass-shadow);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.theme-toggle-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(120, 120, 128, 0.16);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}
.theme-toggle-btn:hover { transform: scale(1.08); }
.theme-toggle-btn:active { transform: scale(0.95); }

.avatar {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    background: linear-gradient(135deg, #0071e3, #42a5f5);
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
    box-shadow: 0 8px 20px rgba(0, 113, 227, 0.3);
}

h1 { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 6px; }
p.subtitle { color: var(--text-secondary); font-size: 1rem; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--badge-bg);
    color: var(--badge-text);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    margin-top: 15px;
}
.badge-dot { width: 8px; height: 8px; background-color: var(--badge-text); border-radius: 50%; }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background-color: var(--glass-fallback);
    background: var(--glass-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--glass-shadow);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.3s ease;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 16px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}
.icon-loto { background: linear-gradient(135deg, #ff9500, #ffcc00); color: #fff; }
.icon-semnmark { background: linear-gradient(135deg, #5856d6, #af52de); color: #fff; }

.card-tag { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.card h2 { font-size: 1.3rem; font-weight: 600; margin-bottom: 8px; }
.card p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.45; margin-bottom: 20px; }

.card-btn {
    align-self: flex-start;
    background: var(--accent-blue);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 18px;
    font-weight: 600;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease;
}
.card:hover .card-btn {
    background: var(--accent-hover);
}

footer { text-align: center; color: var(--text-secondary); font-size: 0.85rem; padding: 10px 0; }
