/* ===== Variables ===== */
:root {
    --bg: #0a0a0f;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --text: #ffffff;
    --text-secondary: #ccccdd;
    --text-muted: #8888a0;
    --accent: #ffffff;
    --accent-light: #6ace90;
    --accent-glow: rgba(108, 99, 255, 0.3);
    --accent-green: #00d4aa;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.15);
    --gradient: linear-gradient(135deg, #e3e2f0 0%, #00d4aa 100%);
    --radius: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection {
    background: var(--accent);
    color: white;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

/* ===== Canvas ===== */
#particles {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== Page Layout ===== */
.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 40px 24px;
}

.center-content {
    max-width: 750px;
    width: 100%;
    text-align: center;
}

/* ===== Home Page ===== */
.greeting {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 16px;
    letter-spacing: 1px;
    opacity: 0;
    animation: fadeUp 0.7s ease forwards 0.1s;
}

.name {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(2.8rem, 7vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeUp 0.7s ease forwards 0.25s;
}

.title-line {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
    opacity: 0;
    animation: fadeUp 0.7s ease forwards 0.4s;
}

.divider {
    flex: 1;
    height: 1px;
    background: var(--border-hover);
}

.title-text {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--text-secondary);
}

.description {
    font-size: 0.95rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 36px;
    opacity: 0;
    animation: fadeUp 0.7s ease forwards 0.55s;
}

/* ===== Tech Stack ===== */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeUp 0.7s ease forwards 0.65s;
}

.stack-group {
    text-align: center;
}

.stack-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stack-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.tag {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent-light);
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.15);
    padding: 5px 14px;
    border-radius: 20px;
    transition: var(--transition);
}

.tag:hover {
    background: rgba(108, 99, 255, 0.2);
    border-color: rgba(108, 99, 255, 0.3);
    transform: translateY(-2px);
}

/* ===== Button ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 300;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.45);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    opacity: 0;
    animation: fadeUp 0.7s ease forwards 0.8s;
}

.btn:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
}

/* ===== Contact Page ===== */
.back-link {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    opacity: 0;
    animation: fadeUp 0.5s ease forwards 0.1s;
}

.back-link:hover {
    color: var(--accent);
    transform: translateX(-4px);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    animation: fadeUp 0.7s ease forwards 0.2s;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 48px;
    opacity: 0;
    animation: fadeUp 0.7s ease forwards 0.35s;
}

/* ===== Contact Row (icon-only, row layout) ===== */
.contact-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 40px;
    opacity: 0;
    animation: fadeUp 0.7s ease forwards 0.5s;
}

.contact-icon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
}

.contact-icon-card:hover {
    transform: translateY(-6px);
}

.icon-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: var(--transition);
}

.contact-icon-card:hover .icon-circle {
    background: rgba(255, 255, 255, 0.08);
    border-color: #ffffff;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

.icon-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
    transition: var(--transition);
}

.contact-icon-card:hover .icon-label {
    color: #ffffff;
}

/* ===== Glow Effect ===== */
.page::before {
    content: '';
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    animation: glow-pulse 4s ease-in-out infinite alternate;
}

@keyframes glow-pulse {
    from { opacity: 0.2; transform: translate(-50%, -50%) scale(1); }
    to { opacity: 0.5; transform: translate(-50%, -50%) scale(1.15); }
}

/* ===== Animations ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .name {
        font-size: 2.4rem;
    }

    .tech-stack {
        gap: 16px;
    }

    /* Contact: column on mobile */
    .contact-row {
        flex-direction: column;
        align-items: center;
        gap: 28px;
    }
}
