/* ============================================
   martinkazemi.ir — Premium Dark Theme
   ============================================ */

:root {
    --bg: #0c0c14;
    --bg-2: #111119;
    --bg-3: #16161f;
    --bg-card: rgba(22, 22, 31, 0.6);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text: #f0f0f5;
    --text-muted: #8b8ba3;
    --text-dim: #5c5c72;
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent: #22d3ee;
    --accent-2: #a78bfa;
    --success: #34d399;
    --error: #f87171;
    --gradient: linear-gradient(135deg, #6366f1 0%, #22d3ee 50%, #a78bfa 100%);
    --gradient-text: linear-gradient(135deg, #818cf8, #22d3ee, #c4b5fd);
    --font: 'Vazirmatn', system-ui, sans-serif;
    --radius: 14px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 76px;
    --navbar-bg: rgba(12, 12, 20, 0.7);
    --navbar-bg-scrolled: rgba(12, 12, 20, 0.92);
    --orb-opacity: 0.35;
    --grid-line: rgba(255, 255, 255, 0.02);
    --showcase-card-bg: rgba(18, 18, 28, 0.8);
    --footer-bg: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.28));
}

[data-theme="light"],
html.theme-light {
    --bg: #dce3ee;
    --bg-2: #d0d9e8;
    --bg-3: #ffffff;
    --bg-card: #ffffff;
    --border: rgba(15, 23, 42, 0.14);
    --border-hover: rgba(15, 23, 42, 0.24);
    --text: #1a1a2e;
    --text-muted: #4a5568;
    --text-dim: #718096;
    --shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.12);
    --glass: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(15, 23, 42, 0.12);
    --navbar-bg: rgba(255, 255, 255, 0.92);
    --navbar-bg-scrolled: rgba(255, 255, 255, 0.98);
    --orb-opacity: 0.22;
    --grid-line: rgba(15, 23, 42, 0.07);
    --showcase-card-bg: #ffffff;
    --footer-bg: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.06));
}

html {
    color-scheme: dark;
}

html[data-theme="light"],
html.theme-light {
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
    scroll-behavior: smooth;
    font-size: 16px;
    scrollbar-gutter: stable;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.75;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--transition), color var(--transition);
}

a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---- Background ---- */
.bg-mesh {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: var(--orb-opacity);
    animation: orbFloat 20s ease-in-out infinite;
}

.bg-orb-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #6366f1 0%, transparent 70%);
    top: -200px; right: -100px;
}

.bg-orb-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #22d3ee 0%, transparent 70%);
    bottom: -150px; left: -100px;
    animation-delay: -7s;
}

.bg-orb-3 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, #a78bfa 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
    opacity: 0.2;
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ---- Glass Card ---- */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* ---- Navbar ---- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
    background: var(--navbar-bg-scrolled);
    border-bottom-color: var(--border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--text);
}

.logo:hover { color: var(--text); }

.logo-icon {
    position: relative;
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--gradient);
    padding: 2px;
    flex-shrink: 0;
}

.logo-icon-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%; height: 100%;
    background: var(--bg);
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1a1a28, #12121c);
    color: white;
}

.logo-text { display: flex; flex-direction: column; }
.logo-name { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.logo-role { font-size: 0.75rem; color: var(--text-muted); font-weight: 400; }

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    flex-shrink: 0;
}

.nav-links li {
    display: flex;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}

.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--primary-light);
    background-color: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.22);
}

.nav-link:focus {
    outline: none;
}

.nav-link:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

.nav-link:active {
    transform: none;
}

.btn-nav-cta {
    padding: 0.55rem 1.25rem !important;
    font-size: 0.85rem !important;
}

.nav-actions .btn-primary:hover,
.nav-actions .btn-primary:active {
    transform: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--glass);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
    position: relative;
    z-index: 20;
    padding: 0;
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

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

.theme-icon-light { display: block; }
.theme-icon-dark { display: none; }

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 10;
}

.nav-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.nav-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.nav-backdrop[hidden] {
    display: none !important;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.45);
}

.btn-glow:hover {
    box-shadow: 0 8px 40px var(--btn-glow, rgba(99, 102, 241, 0.4));
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border-hover);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.06);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    backdrop-filter: blur(10px);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
    color: var(--text);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
}

.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.04); }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 0.9rem 1.75rem; font-size: 0.95rem; }
.btn-block { width: 100%; }

/* ---- Main ---- */
.main-content {
    padding-top: var(--nav-height);
}

/* ---- Hero ---- */
.hero {
    position: relative;
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 0 3rem;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.25);
    border-radius: 50px;
    color: var(--success);
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-greeting {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5.5vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--primary-light);
    font-weight: 500;
    margin-bottom: 1rem;
}

.hero-tagline {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 480px;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
}

.hero-stat-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hero-stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.hero-frame {
    position: relative;
    width: 300px;
    height: 300px;
}

.hero-avatar,
.hero-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
}

.hero-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
    border: 2px solid var(--border);
    font-size: 5rem;
    font-weight: 800;
    color: var(--primary-light);
}

.hero-frame-ring {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(var(--bg), var(--bg)) padding-box,
                var(--gradient) border-box;
    animation: ringRotate 8s linear infinite;
    z-index: 1;
}

.hero-frame-ring-2 {
    inset: -24px;
    opacity: 0.4;
    animation-direction: reverse;
    animation-duration: 12s;
}

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

.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    box-shadow: var(--shadow);
    animation: floatCard 6s ease-in-out infinite;
    z-index: 3;
}

.floating-icon { font-size: 1.1rem; }

.floating-card-1 { top: 10%; right: 0; animation-delay: 0s; }
.floating-card-2 { bottom: 20%; left: -5%; animation-delay: -2s; }
.floating-card-3 { top: 55%; right: -10%; animation-delay: -4s; }

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dim);
    font-size: 0.75rem;
}

.scroll-indicator {
    width: 20px; height: 32px;
    border: 2px solid var(--border-hover);
    border-radius: 10px;
    position: relative;
}

.scroll-indicator::after {
    content: '';
    position: absolute;
    top: 6px; left: 50%;
    transform: translateX(-50%);
    width: 3px; height: 6px;
    background: var(--primary-light);
    border-radius: 2px;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { top: 6px; opacity: 1; }
    50% { top: 14px; opacity: 0.3; }
}

/* ---- Sections ---- */
.section { padding: 5rem 0; }

.section-badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 50px;
    color: var(--primary-light);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

.section-cta {
    text-align: center;
    margin-top: 3rem;
}

/* ---- Website Cards ---- */
.website-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.5rem;
}

.website-card {
    position: relative;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}

.website-card-glow {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 120px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--card-color, var(--primary)) 15%, transparent) 0%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition);
}

.website-card:hover {
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--card-color, var(--primary)) 40%, transparent);
    box-shadow: 0 20px 50px rgba(0,0,0,0.35), 0 0 0 1px color-mix(in srgb, var(--card-color, var(--primary)) 20%, transparent);
}

.website-card:hover .website-card-glow { opacity: 1; }

.website-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 0;
}

.website-card-icon {
    width: 56px; height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    font-size: 1.75rem;
}

.website-card-icon img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.website-card-icon i {
    font-size: 1.35rem;
    color: color-mix(in srgb, var(--card-color, var(--primary)) 75%, white);
}

.website-card-badge {
    padding: 0.25rem 0.65rem;
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.25);
    border-radius: 50px;
    color: var(--success);
    font-size: 0.72rem;
    font-weight: 600;
}

.website-card-body { padding: 1.25rem 1.5rem 1.5rem; }

.website-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.website-card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.website-card-footer {
    display: flex;
    gap: 0.75rem;
}

/* ---- About Preview ---- */
.section-about-preview { padding: 3rem 0 5rem; }

.about-preview-card {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    padding: 3rem;
    align-items: center;
}

.about-preview-bio {
    color: var(--text-muted);
    margin: 1rem 0 1.75rem;
    line-height: 1.85;
}

.about-preview-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.about-preview-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.feature-item {
    padding: 1.5rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: all var(--transition);
}

.feature-item:hover {
    background: rgba(255,255,255,0.04);
    border-color: var(--border-hover);
    transform: translateY(-3px);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.feature-item h4 {
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
}

.feature-item p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ---- CTA Banner ---- */
.cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.5rem 3rem;
    background: linear-gradient(135deg, rgba(99,102,241,0.12) 0%, rgba(34,211,238,0.08) 100%);
    border-color: rgba(99,102,241,0.2);
}

.cta-banner h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.cta-banner p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ---- Page Hero ---- */
.page-hero {
    padding: 4rem 0 3rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(99,102,241,0.05) 0%, transparent 100%);
}

.page-hero-colored {
    background: linear-gradient(180deg, color-mix(in srgb, var(--page-color, var(--primary)) 8%, transparent) 0%, transparent 100%);
}

.page-hero-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    flex-wrap: wrap;
}

.page-hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.page-hero-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 520px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary-light); }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    transition: color var(--transition);
}

.back-link:hover { color: var(--primary-light); }

/* ---- About Page ---- */
.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 560px);
    gap: 2rem;
    justify-content: center;
    align-items: end;
    max-width: 920px;
    margin: 0 auto;
}

.about-main,
.about-sidebar {
    min-width: 0;
    display: flex;
    align-items: flex-end;
}

.about-profile-card {
    width: 100%;
    padding: 1.75rem;
    text-align: center;
    position: sticky;
    top: calc(var(--nav-height) + 1.5rem);
    overflow: hidden;
    background: linear-gradient(
        155deg,
        color-mix(in srgb, var(--primary) 14%, var(--bg-card)) 0%,
        color-mix(in srgb, var(--accent) 8%, var(--bg-card)) 42%,
        color-mix(in srgb, var(--accent-2) 10%, var(--bg-card)) 100%
    );
    border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
    box-shadow:
        0 14px 36px color-mix(in srgb, var(--primary) 12%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.about-profile-card::before,
.about-profile-card::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.about-profile-card::before {
    top: -70px;
    right: -50px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, color-mix(in srgb, var(--primary) 28%, transparent) 0%, transparent 72%);
}

.about-profile-card::after {
    bottom: -60px;
    left: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 24%, transparent) 0%, transparent 72%);
}

.about-profile-card > * {
    position: relative;
    z-index: 1;
}

html[data-theme="light"] .about-profile-card,
html.theme-light .about-profile-card {
    background: linear-gradient(
        145deg,
        #e8edff 0%,
        #f3f6ff 38%,
        #e7f7ff 72%,
        #f8fafc 100%
    );
    border-color: rgba(99, 102, 241, 0.18);
    box-shadow:
        0 14px 34px rgba(99, 102, 241, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.about-avatar-wrap {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 1.25rem;
    overflow: hidden;
    border-radius: 50%;
    background: #f3f4f6;
    border: 3px solid rgba(255, 255, 255, 0.55);
    box-shadow:
        0 10px 28px color-mix(in srgb, var(--primary) 22%, transparent),
        0 0 0 1px color-mix(in srgb, var(--primary) 18%, transparent);
}

.about-avatar {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    object-position: center 14%;
}

.about-avatar-wrap .hero-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    font-size: 3.5rem;
}

.about-status {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--success);
    white-space: nowrap;
}

.about-name {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.about-role {
    color: var(--primary-light);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.about-info-list {
    text-align: right;
    margin-bottom: 1rem;
}

.about-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.about-info-item:last-child { border-bottom: none; }

.about-info-item svg {
    width: 20px;
    height: 20px;
    color: var(--primary-light);
    flex-shrink: 0;
}

.about-info-item > div {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    flex: 1;
}

.about-info-item .info-label {
    display: inline;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 0;
    flex-shrink: 0;
}

.about-info-item .info-label::after {
    content: ':';
    margin-inline-start: 0.1rem;
}

.about-info-item .info-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

a.info-value:hover { color: var(--primary-light); }

.about-sidebar-social {
    margin-bottom: 1.25rem;
}

.about-sidebar-social .social-links {
    justify-content: center;
}

.about-content-card {
    width: 100%;
    padding: 1.75rem;
    overflow: hidden;
    position: relative;
    background: linear-gradient(
        155deg,
        color-mix(in srgb, var(--primary) 14%, var(--bg-card)) 0%,
        color-mix(in srgb, var(--accent) 8%, var(--bg-card)) 42%,
        color-mix(in srgb, var(--accent-2) 10%, var(--bg-card)) 100%
    );
    border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
    box-shadow:
        0 14px 36px color-mix(in srgb, var(--primary) 12%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.about-content-card::before,
.about-content-card::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.about-content-card::before {
    top: -70px;
    left: -50px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 28%, transparent) 0%, transparent 72%);
}

.about-content-card::after {
    bottom: -60px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, color-mix(in srgb, var(--primary) 24%, transparent) 0%, transparent 72%);
}

.about-content-card > * {
    position: relative;
    z-index: 1;
}

html[data-theme="light"] .about-content-card,
html.theme-light .about-content-card {
    background: linear-gradient(
        145deg,
        #e8edff 0%,
        #f3f6ff 38%,
        #e7f7ff 72%,
        #f8fafc 100%
    );
    border-color: rgba(99, 102, 241, 0.18);
    box-shadow:
        0 14px 34px rgba(99, 102, 241, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.content-card-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.content-card-title svg {
    width: 20px; height: 20px;
    color: var(--primary-light);
}

.about-bio-content {
    color: var(--text-muted);
    line-height: 1.9;
    font-size: 0.95rem;
}

.about-bio-content p {
    margin-bottom: 1rem;
}

.about-bio-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem 0.75rem;
    margin: 0 0 1rem;
    padding: 0;
}

.about-bio-list li {
    position: relative;
    padding-right: 1rem;
    margin-bottom: 0;
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.86rem;
}

.about-bio-list li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0.72em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-light);
    box-shadow: 0 0 8px color-mix(in srgb, var(--primary-light) 45%, transparent);
}

.about-bio-content p:last-child {
    margin-bottom: 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.skill-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0.5rem 0.75rem;
    align-items: center;
    padding: 1.5rem;
    transition: all var(--transition);
}

.skill-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
}

.skill-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--skill-color, var(--primary)) 12%, transparent);
    border-radius: 12px;
    font-size: 1.25rem;
    margin-bottom: 0;
    grid-row: 1;
    grid-column: 1;
}

.skill-card h4 {
    font-size: 0.95rem;
    margin-bottom: 0;
    grid-row: 1;
    grid-column: 2;
}

.skill-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
    grid-row: 2;
    grid-column: 1 / -1;
}

/* ---- Website List ---- */
.websites-count {
    margin-bottom: 2rem;
}

.count-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ---- Website Detail ---- */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}

.detail-hero-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.detail-hero-icon {
    font-size: 3rem;
    line-height: 1;
    color: var(--page-color, var(--primary));
}

.detail-card { overflow: hidden; }

.detail-thumbnail-wrap {
    position: relative;
    aspect-ratio: 16/7;
    overflow: hidden;
}

.detail-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-thumbnail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, var(--bg-3) 100%);
}

.detail-body { padding: 2rem; }

.detail-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.detail-description {
    color: var(--text-muted);
    line-height: 1.9;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.detail-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.detail-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.detail-meta-item svg {
    width: 20px; height: 20px;
    color: var(--primary-light);
    flex-shrink: 0;
    margin-top: 2px;
}

.meta-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 0.2rem;
}

.meta-value {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    word-break: break-all;
}

a.meta-value:hover { color: var(--primary-light); }

.sidebar-card {
    padding: 1.5rem;
    position: sticky;
    top: calc(var(--nav-height) + 1.5rem);
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-muted);
}

.sidebar-title svg { width: 18px; height: 18px; }

.other-websites-list {
    list-style: none;
    margin-bottom: 1.25rem;
}

.other-website-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem;
    border-radius: var(--radius);
    color: var(--text);
    transition: all var(--transition);
    border: 1px solid transparent;
}

.other-website-link:hover {
    background: rgba(255,255,255,0.03);
    border-color: color-mix(in srgb, var(--link-color, var(--primary)) 25%, transparent);
    color: var(--text);
}

.other-website-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    color: var(--link-color, var(--primary));
}

.other-website-info { flex: 1; min-width: 0; }

.other-website-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.other-website-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.other-website-arrow {
    width: 16px; height: 16px;
    color: var(--text-dim);
    flex-shrink: 0;
    transition: transform var(--transition);
}

.other-website-link:hover .other-website-arrow {
    transform: translateX(-4px);
    color: var(--primary-light);
}

/* ---- Contact ---- */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
    max-width: 560px;
    margin: 0 auto;
}

.contact-form-wrap {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-intro-card {
    padding: 1.25rem 1.5rem;
    text-align: center;
}

.contact-intro-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    margin: 0;
}

.contact-form {
    padding: 1.75rem;
}

.contact-form .form-group {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.5rem 1rem;
}

.contact-form .form-group label {
    display: inline-flex;
    align-items: center;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.contact-form .form-group > .form-input,
.contact-form .form-group > .phone-input-row,
.contact-form .form-group .phone-input-row {
    min-width: 0;
}

.contact-form .form-group > .form-error,
.contact-form .form-group > .otp-status {
    grid-column: 1 / -1;
}

.contact-form .form-group-full {
    align-items: start;
}

.contact-form .form-group-full label {
    padding-top: 0.85rem;
}

.form-group-phone {
    margin-bottom: 1.25rem;
    grid-template-columns: auto auto;
    justify-content: start;
    align-items: center;
}

.form-group-phone .phone-input-row {
    grid-template-columns: 10.75rem auto;
    width: fit-content;
    max-width: 100%;
}

.form-group-phone .phone-input-row--otp {
    grid-template-columns: 5.5rem auto auto;
}

.form-group-phone input[name="phone"] {
    text-align: center;
    letter-spacing: 0.03em;
    font-variant-numeric: tabular-nums;
}

.form-row-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.form-row-double .form-group {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.5rem;
}

.form-row-double .form-group > .form-error {
    grid-column: 1;
}

.phone-input-row--otp {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.contact-info-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.contact-info-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: all var(--transition);
}

a.contact-method:hover {
    background: rgba(255,255,255,0.04);
    border-color: var(--border-hover);
    color: var(--text);
    transform: translateX(-4px);
}

.contact-method-icon {
    width: 48px; height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--icon-bg);
    border-radius: 12px;
    flex-shrink: 0;
}

.contact-method-icon svg {
    width: 22px; height: 22px;
    color: var(--icon-color);
}

.method-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 0.15rem;
}

.method-value {
    font-size: 0.9rem;
    font-weight: 500;
}

.contact-social-section h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}

.form-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.form-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.form-group-full { grid-column: 1 / -1; }

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255,255,255,0.03);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 0.92rem;
    transition: all var(--transition);
}

.form-input::placeholder { color: var(--text-dim); }

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(99,102,241,0.04);
    box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 140px;
}

.phone-verify-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.phone-input-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: center;
}

.phone-input-row--otp {
    grid-template-columns: 1fr auto auto;
}

.otp-inline-input {
    text-align: center;
    letter-spacing: 0.2em;
    font-variant-numeric: tabular-nums;
}

.otp-inline-input[hidden],
.phone-input-row [hidden] {
    display: none !important;
}

.otp-status {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    line-height: 1.6;
}

.otp-status-success { color: var(--success); }
.otp-status-error { color: var(--error); }
.otp-status-info { color: var(--text-muted); }

.phone-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.85rem;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--success) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--success) 25%, transparent);
    color: var(--success);
    font-size: 0.85rem;
    font-weight: 600;
}

.phone-verified-badge[hidden],
.otp-status[hidden] {
    display: none !important;
}

.contact-fields-locked .contact-field-lockable {
    opacity: 0.55;
    pointer-events: none;
    user-select: none;
}

.contact-fields-locked .contact-field-lockable .form-input {
    background: rgba(255, 255, 255, 0.02);
}

.form-error {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--error);
    font-size: 0.82rem;
    margin-top: 0.4rem;
}

/* ---- Social Links ---- */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.social-links:empty {
    display: none;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.9rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    transition: all var(--transition);
}

.social-btn svg,
.social-btn i {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 1;
}

.social-btn:hover {
    background: rgba(99,102,241,0.1);
    border-color: rgba(99,102,241,0.3);
    color: var(--primary-light);
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 480px;
    margin: 0 auto;
}

.empty-state-icon {
    width: 80px; height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99,102,241,0.1);
    border-radius: 50%;
}

.empty-state-icon svg {
    width: 40px; height: 40px;
    color: var(--primary-light);
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ---- Toast ---- */
.toast-container {
    position: fixed;
    top: calc(var(--nav-height) + 1rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    width: 90%;
    max-width: 480px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: toastIn 0.4s ease;
    margin-bottom: 0.5rem;
}

.toast-success {
    border-color: rgba(52, 211, 153, 0.3);
    background: rgba(52, 211, 153, 0.08);
}

.toast-icon {
    width: 20px; height: 20px;
    color: var(--success);
    flex-shrink: 0;
}

.toast-close {
    margin-right: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
}

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

/* ---- Footer ---- */
.footer {
    margin-top: 0;
    padding: 2rem 0 2rem;
    border-top: 1px solid var(--border);
    background: var(--footer-bg);
    overflow: hidden;
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.25rem 6rem;
    margin-bottom: 1.5rem;
}

.footer-brand-col,
.footer-links-col,
.footer-contact-col {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 34px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1;
    margin: 0;
}

.footer-logo .logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.footer-logo .logo-icon-inner {
    border-radius: 8px;
    font-size: 0.72rem;
}

.footer-logo:hover { color: var(--text); }

.footer-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
    max-width: 320px;
}

.footer-links-col,
.footer-contact-col {
    justify-content: flex-start;
}

.footer-links-col h4,
.footer-contact-col h4 {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    margin: 0;
    padding: 0;
    color: var(--text);
    flex-shrink: 0;
}

.footer-contact-col {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.footer-inline-link,
.footer-inline-text {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
}

.footer-inline-link:hover {
    color: var(--primary-light);
}

.footer-links-col ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.footer-links-col li {
    margin: 0;
    display: inline-flex;
    align-items: center;
}

.footer-links-col a {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1;
    transition: color var(--transition);
}

.footer-links-col a:hover { color: var(--primary-light); }

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-dim);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-bottom p {
    margin: 0;
}

/* ---- Footer 3D Showcase ---- */
.footer-3d-scene {
    position: relative;
    margin-top: 1.75rem;
    padding: 1.25rem 0 0.5rem;
    perspective: 1100px;
    overflow: hidden;
}

.footer-3d-platform {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: min(92%, 920px);
    height: 120px;
    transform: translateX(-50%) rotateX(72deg);
    transform-origin: center bottom;
    background: radial-gradient(ellipse at center, color-mix(in srgb, var(--primary) 18%, transparent) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.9;
    pointer-events: none;
}

.footer-3d-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.65rem;
    max-width: 980px;
    margin: 0 auto;
    transform-style: preserve-3d;
    transform: rotateX(18deg);
    transform-origin: center bottom;
}

.footer-3d-card {
    position: relative;
    display: block;
    color: var(--text);
    transform-style: preserve-3d;
    transform: translateZ(calc(var(--card-delay) * 6px)) translateY(calc(var(--card-delay) * -2px));
    animation: footerCardFloat 5s ease-in-out infinite;
    animation-delay: calc(var(--card-delay) * 0.35s);
}

.footer-3d-card:hover {
    color: var(--text);
    transform: translateZ(calc(var(--card-delay) * 6px + 18px)) translateY(-10px) scale(1.05);
}

.footer-3d-card-top {
    height: 8px;
    border-radius: 8px 8px 0 0;
    background: color-mix(in srgb, var(--card-color) 85%, white);
    transform: translateZ(1px);
    box-shadow: 0 -2px 8px color-mix(in srgb, var(--card-color) 30%, transparent);
}

.footer-3d-card-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 100px;
    padding: 0.8rem 0.45rem;
    background: linear-gradient(
        160deg,
        color-mix(in srgb, var(--card-color) 22%, var(--bg-3)) 0%,
        var(--bg-card) 55%,
        color-mix(in srgb, var(--card-color) 10%, var(--bg-2)) 100%
    );
    border: 1px solid color-mix(in srgb, var(--card-color) 35%, var(--border));
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.22),
        0 0 0 1px color-mix(in srgb, var(--card-color) 12%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateZ(8px);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.footer-3d-card:hover .footer-3d-card-body {
    box-shadow:
        0 22px 40px color-mix(in srgb, var(--card-color) 25%, rgba(0, 0, 0, 0.25)),
        0 0 24px color-mix(in srgb, var(--card-color) 20%, transparent);
}

.footer-3d-card-body i {
    font-size: 1.3rem;
    color: color-mix(in srgb, var(--card-color) 75%, white);
}

.footer-3d-card-body span {
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.35;
    word-break: break-word;
    color: var(--text-muted);
}

.footer-3d-card-shadow {
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: -8px;
    height: 14px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.35) 0%, transparent 72%);
    transform: rotateX(90deg) translateZ(-6px);
    filter: blur(4px);
    pointer-events: none;
}

@keyframes footerCardFloat {
    0%, 100% { transform: translateZ(calc(var(--card-delay) * 6px)) translateY(0); }
    50% { transform: translateZ(calc(var(--card-delay) * 6px + 10px)) translateY(-6px); }
}

.heart { color: #f87171; }

/* ---- Reveal Animation ---- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-tagline { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-visual { order: -1; min-height: 320px; }
    .hero-frame { width: 240px; height: 240px; }
    .floating-card-3 { display: none; }

    .about-preview-card { grid-template-columns: 1fr; padding: 2rem; }
    .about-preview-features { grid-template-columns: 1fr; }

    .about-layout {
        grid-template-columns: 1fr;
        max-width: 560px;
    }

    .about-bio-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-profile-card { position: static; }

    .detail-layout { grid-template-columns: 1fr; }
    .sidebar-card { position: static; }

    .contact-layout { grid-template-columns: 1fr; }

    .footer-grid {
        gap: 0.75rem 1rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        justify-content: flex-end;
    }

    .nav-toggle { display: flex; z-index: 1002; }

    .section { padding: 3.25rem 0; }
    .section-header { margin-bottom: 2.25rem; }
    .container { padding: 0 1rem; }

    .page-hero { padding: 2.5rem 0 2rem; }
    .page-hero-container { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .page-hero-desc { font-size: 0.95rem; }

    .detail-body { padding: 1.25rem; }
    .detail-hero-icon { font-size: 2.25rem; }
    .detail-section-title { font-size: 1.15rem; }

    .about-profile-card,
    .about-content-card { padding: 1.25rem; }
    .about-info-item .info-value {
        white-space: normal;
        word-break: break-word;
    }
    .about-sidebar-social .social-links {
        justify-content: center;
    }

    .contact-form { padding: 1.25rem; }
    .contact-layout { max-width: 100%; }

    .footer {
        padding: 1.5rem 0 1.25rem;
    }

    .footer-contact-col,
    .footer-inline-link,
    .footer-inline-text {
        white-space: normal;
        word-break: break-word;
    }

    .cta-banner .btn,
    .about-preview-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .nav-menu {
        position: fixed;
        top: 0; right: 0;
        width: min(320px, 85vw);
        height: 100vh;
        height: 100dvh;
        background: var(--bg-2);
        border-left: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: calc(var(--nav-height) + 1rem) 1.5rem 2rem;
        transform: translateX(100%);
        transition: transform var(--transition);
        z-index: 1001;
        gap: 1.5rem;
        overflow-y: auto;
    }

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

    .nav-links {
        flex-direction: column;
        gap: 0.25rem;
    }

    .nav-link {
        padding: 0.85rem 1rem;
        font-size: 1rem;
    }

    .nav-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .btn-nav-cta {
        margin-right: 0;
        width: 100%;
    }

    .hero { min-height: auto; padding: 3rem 0 2rem; }
    .hero-scroll { display: none; }

    .website-grid { grid-template-columns: 1fr; }

    .cta-banner {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .skills-grid { grid-template-columns: 1fr; }

    .form-grid { grid-template-columns: 1fr; }
    .form-row-double { grid-template-columns: 1fr; }
    .phone-input-row { grid-template-columns: 1fr; }

    .form-group-phone {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .form-group-phone .phone-input-row,
    .form-group-phone .phone-input-row--otp {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .form-group-phone .phone-input-row .btn {
        width: 100%;
        justify-content: center;
    }

    .contact-form .form-group {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .contact-form .form-group label {
        margin-bottom: 0.35rem;
    }

    .contact-form .form-group-full label {
        padding-top: 0;
    }

    .detail-meta { grid-template-columns: 1fr; }

    .footer-grid {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .footer-links-col {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .footer-contact-col {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.75rem;
    }

    .footer-links-col ul {
        justify-content: flex-start;
    }

    .footer-bottom { flex-direction: column; text-align: center; }

    .footer-3d-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.65rem;
        padding-bottom: 0.35rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        transform: none;
        scrollbar-width: thin;
    }

    .footer-3d-card {
        flex: 0 0 42%;
        max-width: 9.5rem;
        animation: none;
        transform: none;
        scroll-snap-align: start;
    }

    .footer-3d-platform {
        display: none;
    }

    .footer-3d-scene {
        perspective: none;
    }
}

@media (max-width: 520px) {
    .about-bio-list {
        grid-template-columns: 1fr;
    }

    .footer-3d-card {
        flex-basis: 46%;
    }

    .footer-3d-card-body {
        min-height: 82px;
        padding: 0.6rem 0.35rem;
    }

    .footer-3d-card-body span {
        font-size: 0.72rem;
    }

    .social-btn {
        flex: 1 1 calc(50% - 0.35rem);
        justify-content: center;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .section { padding: 2.75rem 0; }
    .section-title { font-size: 1.55rem; }

    .hero-stats { flex-wrap: wrap; gap: 1rem; }
    .hero-stat-divider { display: none; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
    .floating-card { display: none; }

    .about-preview-actions {
        flex-direction: column;
    }

    .toast-container {
        width: calc(100% - 1.25rem);
        max-width: none;
    }

    .showcase-card-footer,
    .website-card-footer {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .footer-3d-card {
        animation: none !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
