/* ═══════════════════════════════════════════════════════════
   Taha Deris — Portfolio Stylesheet
   ═══════════════════════════════════════════════════════════ */

/* ─── Font Face ─── */
@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazirmatn[wght].woff2') format('woff2 supports variations'),
         url('fonts/Vazirmatn[wght].woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE9F, U+10D00-10D3F, U+10EC0-10EFF, U+1EE00-1EEFF;
}

/* ─── Tokens ─── */
:root {
    /* Background */
    --bg:           #09090b;
    --bg-2:         #0c0c0e;

    /* Card */
    --card:         #18181b;
    --card-hover:   #1f1f23;
    --card-active:  #27272a;

    /* Border */
    --border:       #27272a;
    --border-hover: #3f3f46;

    /* Text */
    --white:        #fafafa;
    --gray-100:     #f4f4f5;
    --gray-200:     #e4e4e7;
    --gray-300:     #d4d4d8;
    --gray-400:     #a1a1aa;
    --gray-500:     #71717a;
    --gray-600:     #52525b;

    /* Colors */
    --blue:         #3b82f6;
    --blue-dim:     rgba(59, 130, 246, 0.1);
    --blue-border:  rgba(59, 130, 246, 0.2);

    --green:        #22c55e;
    --green-dim:    rgba(34, 197, 94, 0.1);
    --green-border: rgba(34, 197, 94, 0.2);

    --purple:       #a855f7;
    --purple-dim:   rgba(168, 85, 247, 0.1);
    --purple-border: rgba(168, 85, 247, 0.2);

    --orange:       #f97316;
    --orange-dim:   rgba(249, 115, 22, 0.1);
    --orange-border: rgba(249, 115, 22, 0.2);

    --rose:         #f43f5e;
    --rose-dim:     rgba(244, 63, 94, 0.1);

    --cyan:         #06b6d4;
    --cyan-dim:     rgba(6, 182, 212, 0.1);

    --yellow:       #eab308;
    --yellow-dim:   rgba(234, 179, 8, 0.1);

    /* Radius */
    --radius:       16px;
    --radius-sm:    12px;
    --radius-xs:    8px;
    --radius-full:  9999px;

    /* Easing */
    --ease:         cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out:     cubic-bezier(0, 0, 0.2, 1);
}

/* ─── Light Theme ─── */
[data-theme="light"] {
    --bg:           #f8fafc;
    --bg-2:         #f1f5f9;
    --card:         #ffffff;
    --card-hover:   #f8fafc;
    --card-active:  #f1f5f9;
    --border:       #e2e8f0;
    --border-hover: #cbd5e1;
    --white:        #0f172a;
    --gray-100:     #1e293b;
    --gray-200:     #334155;
    --gray-300:     #475569;
    --gray-400:     #64748b;
    --gray-500:     #94a3b8;
    --gray-600:     #cbd5e1;
}

/* ─── Reset ─── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--gray-100);
    min-height: 100vh;
    padding: 0;
    line-height: 1.7;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background 0.4s var(--ease), color 0.4s var(--ease);
    will-change: background, color;
}

/* ─── Loader ─── */
.loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--border);
    border-top-color: var(--blue);
    border-right-color: var(--purple);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.loader-text {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 600;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── Canvas ─── */
#particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    transition: transform 0.4s var(--ease), background 0.4s, border-color 0.4s;
}

[data-theme="light"] .navbar {
    background: rgba(248, 250, 252, 0.9);
}

.navbar.visible {
    transform: translateY(0);
    border-bottom-color: var(--border);
}

.navbar::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--blue), var(--purple), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.navbar.visible::after {
    opacity: 0.3;
}

/* Brand */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--white);
}

.nav-logo {
    width: 36px;
    height: 36px;
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: -1px;
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s, border-color 0.3s;
    direction: ltr;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

.nl-t { color: var(--blue); }
.nl-d { color: var(--purple); }

.nav-brand:hover .nav-logo {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
    border-color: var(--blue-border);
}

.nav-title {
    font-weight: 700;
    font-size: 15px;
}

/* Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-400);
    text-decoration: none;
    transition: all 0.2s var(--ease);
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background: var(--card-hover);
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
    background: var(--card-active);
}

/* Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-xs);
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-btn:hover {
    background: var(--card-hover);
    border-color: var(--border-hover);
    color: var(--white);
}

.nav-hamburger {
    display: none;
}

[data-theme="light"] .nav-btn:hover {
    color: var(--gray-100);
}

/* Theme Icons */
.theme-icon-sun,
.theme-icon-moon {
    transition: opacity 0.3s;
    display: none;
}

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

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

:root:not([data-theme]) .theme-icon-sun {
    display: block;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE MENU
   ═══════════════════════════════════════════════════════════ */

.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease);
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background: var(--card);
    border-left: 1px solid var(--border);
    padding: 24px;
    transform: translateX(100%);
    transition: transform 0.3s var(--ease-spring);
    overflow-y: auto;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.2);
}

.mobile-menu.open .mobile-menu-panel {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.mobile-menu-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--white);
}

.mobile-menu-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-xs);
    background: var(--card-hover);
    border: none;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s var(--ease);
    margin-bottom: 4px;
}

.mobile-nav-link:hover {
    background: var(--card-hover);
    color: var(--white);
}

.mobile-nav-link svg {
    opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════ */

.main {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 88px 24px 100px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════ */

.hero {
    margin-bottom: 24px;
    animation: fadeIn 0.6s var(--ease) both;
}

.hero-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 40px;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s, box-shadow 0.4s;
}

.hero-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, var(--blue-dim), transparent);
    pointer-events: none;
}

.hero-card::after {
    content: "";
    position: absolute;
    bottom: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 40px rgba(59, 130, 246, 0.08);
}

/* Avatar */
.hero-avatar {
    position: relative;
    z-index: 1;
}

.hero-logotype {
    width: 120px;
    height: 120px;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 42px;
    letter-spacing: -3px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
    direction: ltr;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

.hero-logotype::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(168, 85, 247, 0.08));
    pointer-events: none;
}

.hero-logotype:hover {
    border-color: var(--blue-border);
    box-shadow: 0 0 24px rgba(59, 130, 246, 0.1);
}

.lt-t {
    color: var(--blue);
}

.lt-d {
    color: var(--purple);
}

/* Content */
.hero-content {
    position: relative;
    z-index: 1;
}

.hero-name {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-300) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.hero-subtitle {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--gray-400);
    margin-bottom: 16px;
}

.hero-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.hero-typed {
    font-size: 14px;
    color: var(--blue);
    background: var(--blue-dim);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--blue-border);
    font-weight: 600;
    display: inline-block;
    position: relative;
}

.hero-typed::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--blue), var(--purple));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s;
}

.hero-typed:hover::before {
    opacity: 0.15;
}

.hero-cursor {
    color: var(--blue);
    animation: blink 1s step-end infinite;
    margin-right: 2px;
}

.hero-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 12px;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50%      { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Actions */
.hero-actions {
    position: relative;
    z-index: 1;
}

.hero-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all 0.3s var(--ease);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.hero-btn-primary {
    background: linear-gradient(135deg, var(--blue), #6366f1);
    color: white;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
    filter: brightness(1.1);
}

/* ═══════════════════════════════════════════════════════════
   STATS
   ═══════════════════════════════════════════════════════════ */

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s;
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    transition: transform 0.3s var(--ease-spring);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1);
}

.stat-icon.blue   { background: var(--blue-dim);   color: var(--blue); }
.stat-icon.green  { background: var(--green-dim);  color: var(--green); }
.stat-icon.purple { background: var(--purple-dim); color: var(--purple); }
.stat-icon.orange { background: var(--orange-dim); color: var(--orange); }

.stat-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 4px;
    transition: color 0.4s;
}

.stat-label {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   BENTO GRID
   ═══════════════════════════════════════════════════════════ */

.bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.bento-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: reveal 0.5s var(--ease-out) forwards;
    animation-delay: calc(var(--delay, 0) * 50ms);
}

.bento-card.revealed {
    animation: none;
    opacity: 1;
    transform: translateY(0);
}

.bento-card.revealed:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .bento-card.revealed:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.bento-card.span-2 { grid-column: span 2; }
.bento-card.span-3 { grid-column: span 3; }

@keyframes reveal {
    to { opacity: 1; transform: translateY(0); }
}

/* Card Header */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: linear-gradient(135deg, var(--blue), var(--purple));
}

.card-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.card-badge.blue   { background: var(--blue-dim);   color: var(--blue);   border: 1px solid var(--blue-border); }
.card-badge.green  { background: var(--green-dim);  color: var(--green);  border: 1px solid var(--green-border); }
.card-badge.purple { background: var(--purple-dim); color: var(--purple); border: 1px solid var(--purple-border); }
.card-badge.orange { background: var(--orange-dim); color: var(--orange); border: 1px solid var(--orange-border); }

/* ═══════════════════════════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════════════════════════ */

.about-text {
    font-size: 15px;
    color: var(--gray-400);
    line-height: 2;
    transition: color 0.4s;
}

.about-content {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.about-avatar {
    flex-shrink: 0;
}

.about-logotype {
    width: 72px;
    height: 72px;
    background: var(--card-hover);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 26px;
    letter-spacing: -2px;
    position: relative;
    direction: ltr;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

.about-logotype::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(168, 85, 247, 0.06));
    pointer-events: none;
}

.about-text strong {
    color: var(--white);
    font-weight: 600;
    transition: color 0.4s;
}

/* ═══════════════════════════════════════════════════════════
   SERVICES
   ═══════════════════════════════════════════════════════════ */

.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.service-item {
    background: var(--card-hover);
    border-radius: var(--radius-sm);
    padding: 24px;
    border: 1px solid var(--border);
    transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.service-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: transform 0.3s var(--ease-spring);
}

.service-item:hover .service-icon {
    transform: scale(1.1) rotate(-3deg);
}

.service-icon.blue   { background: var(--blue-dim);   color: var(--blue); }
.service-icon.purple { background: var(--purple-dim); color: var(--purple); }
.service-icon.orange { background: var(--orange-dim); color: var(--orange); }
.service-icon.green  { background: var(--green-dim);  color: var(--green); }

.service-item h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
    transition: color 0.4s;
}

.service-item p {
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.9;
}

/* ═══════════════════════════════════════════════════════════
   SKILL BARS
   ═══════════════════════════════════════════════════════════ */

.skill-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skill-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-bar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.skill-bar-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-200);
}

.skill-bar-percent {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 600;
}

.skill-bar-track {
    height: 6px;
    background: var(--card-hover);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--blue), var(--purple));
    width: 0%;
    transition: width 1.5s var(--ease-out);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.skill-bar-fill.green  { background: linear-gradient(90deg, var(--green), var(--cyan)); box-shadow: 0 0 8px rgba(34, 197, 94, 0.3); }
.skill-bar-fill.orange { background: linear-gradient(90deg, var(--orange), var(--yellow)); box-shadow: 0 0 8px rgba(249, 115, 22, 0.3); }
.skill-bar-fill.purple { background: linear-gradient(90deg, var(--purple), var(--rose)); box-shadow: 0 0 8px rgba(168, 85, 247, 0.3); }

/* ═══════════════════════════════════════════════════════════
   PROJECTS
   ═══════════════════════════════════════════════════════════ */

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-item {
    display: block;
    background: var(--card-hover);
    border-radius: var(--radius-sm);
    padding: 20px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.project-item:hover {
    border-color: var(--blue-border);
    transform: translateX(4px);
    box-shadow: -4px 0 16px rgba(59, 130, 246, 0.08);
}

.project-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.project-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    transition: color 0.4s;
}

.project-status {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.project-status.live     { background: var(--green-dim);  color: var(--green); }
.project-status.done     { background: var(--blue-dim);   color: var(--blue); }
.project-status.progress { background: var(--orange-dim); color: var(--orange); }

.project-desc {
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.8;
    margin-bottom: 12px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-tags span {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: var(--card);
    color: var(--gray-400);
    border: 1px solid var(--border);
    transition: background 0.4s, border-color 0.4s;
}

/* ═══════════════════════════════════════════════════════════
   SKILLS TAGS
   ═══════════════════════════════════════════════════════════ */

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    font-size: 12px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: var(--card-hover);
    color: var(--gray-200);
    border: 1px solid var(--border);
    transition: all 0.25s var(--ease);
    cursor: default;
}

.skill-tag:hover {
    border-color: var(--blue-border);
    color: var(--blue);
    background: var(--blue-dim);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

/* ═══════════════════════════════════════════════════════════
   TIMELINE
   ═══════════════════════════════════════════════════════════ */

.timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--card-hover);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: border-color 0.3s var(--ease), box-shadow 0.3s;
    position: relative;
}

.timeline-item:hover {
    border-color: var(--border-hover);
    box-shadow: -4px 0 16px rgba(168, 85, 247, 0.06);
}

.timeline-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-icon.blue   { background: var(--blue-dim);   color: var(--blue); }
.timeline-icon.purple { background: var(--purple-dim); color: var(--purple); }
.timeline-icon.orange { background: var(--orange-dim); color: var(--orange); }
.timeline-icon.green  { background: var(--green-dim);  color: var(--green); }

.timeline-item::after {
    content: "";
    position: absolute;
    right: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: linear-gradient(to bottom, var(--blue), var(--purple));
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.3s;
}

.timeline-item:hover::after {
    opacity: 1;
}

.timeline-content {
    flex: 1;
    min-width: 0;
}

.timeline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 12px;
}

.timeline-role {
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    transition: color 0.4s;
}

.timeline-period {
    font-size: 11px;
    color: var(--blue);
    font-weight: 600;
    background: var(--blue-dim);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.timeline-org {
    font-size: 13px;
    color: var(--purple);
    font-weight: 600;
    margin-bottom: 6px;
}

.timeline-desc {
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.9;
}

/* ═══════════════════════════════════════════════════════════
   EDUCATION
   ═══════════════════════════════════════════════════════════ */

.edu-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.edu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: var(--card-hover);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.edu-item:hover {
    border-color: var(--orange-border);
    transform: translateX(4px);
    box-shadow: -4px 0 16px rgba(249, 115, 22, 0.08);
}

.edu-icon {
    width: 44px;
    height: 44px;
    background: var(--orange-dim);
    color: var(--orange);
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.edu-info {
    flex: 1;
}

.edu-degree {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 2px;
    transition: color 0.4s;
}

.edu-school {
    font-size: 12px;
    color: var(--gray-500);
}

.edu-year {
    font-size: 11px;
    color: var(--gray-600);
    white-space: nowrap;
    background: var(--card);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    transition: background 0.4s, border-color 0.4s;
}

/* ═══════════════════════════════════════════════════════════
   CONTACT & SOCIAL
   ═══════════════════════════════════════════════════════════ */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    background: var(--card-hover);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
    text-align: center;
}

.contact-item:hover {
    border-color: var(--blue-border);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .contact-item:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.contact-icon {
    width: 52px;
    height: 52px;
    background: var(--blue-dim);
    color: var(--blue);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
}

.contact-item:hover .contact-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

.contact-icon.tg {
    background: rgba(0, 136, 204, 0.1);
    color: #0088cc;
}

.contact-icon.phone {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.contact-icon.whatsapp {
    background: rgba(37, 211, 102, 0.1);
    color: #25d366;
}

.contact-icon.bale {
    background: rgba(38, 166, 255, 0.1);
    color: #26a6ff;
}

.contact-icon.email {
    background: rgba(234, 67, 53, 0.1);
    color: #ea4335;
}

.contact-grid-4 {
    grid-template-columns: repeat(3, 1fr);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-label {
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    transition: color 0.4s;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */

.bento-footer {
    grid-column: span 3;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 32px;
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    transition: border-color 0.4s;
    position: relative;
    overflow: hidden;
}

.bento-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--blue), var(--purple), transparent);
    opacity: 0.5;
}

.footer-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
}

.footer-tag svg {
    opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════════
   LIGHT THEME OVERRIDES
   ═══════════════════════════════════════════════════════════ */

[data-theme="light"] .hero-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .bento-card,
[data-theme="light"] .bento-footer {
    background: var(--card);
}

[data-theme="light"] .loader {
    background: var(--bg);
}

/* ═══════════════════════════════════════════════════════════
   BACK TO TOP
   ═══════════════════════════════════════════════════════════ */

.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: all 0.3s var(--ease);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
    will-change: transform, opacity;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

/* ═══════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════ */

.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: var(--card);
    border: 1px solid var(--green-border);
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    transition: opacity 0.4s var(--ease-spring), transform 0.4s var(--ease-spring);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(34, 197, 94, 0.1);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    .bento {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .bento-card.span-2,
    .bento-card.span-3 {
        grid-column: span 2;
    }

    .hero-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 32px;
    }

    .hero-avatar { margin: 0 auto; }
    .hero-content { text-align: center; }
    .hero-subtitle { justify-content: center; }
    .hero-location { justify-content: center; }
    .hero-actions { justify-content: center; }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
    .mobile-menu { display: block; }

    .contact-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }

    .timeline {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    #skills,
    #skill-tags {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .main {
        padding: 80px 16px 80px;
    }

    .bento {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .bento-card.span-2,
    .bento-card.span-3 {
        grid-column: span 1;
    }

    .hero-card { padding: 24px; }
    .hero-name { font-size: 28px; }
    .hero-actions { width: 100%; }
    .hero-btn { width: 100%; }

    .about-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .services-grid { grid-template-columns: 1fr; }
    .contact-grid-4 { grid-template-columns: repeat(2, 1fr); }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-number { font-size: 22px; }
    .stat-label { font-size: 11px; }

    .nav-title { display: none; }

    .bento-footer {
        grid-column: span 1;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 20px;
    }

    .footer-tag { font-size: 11px; }

    .skill-bars { gap: 12px; }
    .skill-bar-name { font-size: 12px; }
    .skill-bar-percent { font-size: 11px; }

    .project-desc { font-size: 11px; }
    .project-name { font-size: 14px; }
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
