/* =============================================
   PORTFOLIO — DESIGN SYSTEM
   ============================================= */

/* --- CSS Variables (Design Tokens) --- */
:root {
    /* Colors */
    --bg-primary:    #0a0a0f;
    --bg-secondary:  #12121a;
    --bg-card:       rgba(255,255,255,0.04);
    --bg-card-hover: rgba(255,255,255,0.07);
    --glass:         rgba(255,255,255,0.06);
    --glass-border:  rgba(255,255,255,0.08);

    --text-primary:   #f0f0f5;
    --text-secondary: #8a8a9a;
    --text-muted:     #55556a;

    --accent-1: #6C63FF;
    --accent-2: #00D4AA;
    --accent-3: #FF6B6B;
    --gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));

    /* Spacing */
    --section-pad: 120px;
    --container-w:  1200px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Transition */
    --ease: cubic-bezier(.4,0,.2,1);
}

/* --- Reset & Base --- */
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

::selection { background: var(--accent-1); color: #fff; }

a { text-decoration:none; color:inherit; }
ul { list-style:none; }
img { max-width:100%; display:block; }

.container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Cursor Glow --- */
.cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108,99,255,0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%,-50%);
    transition: opacity .3s;
}

/* === NAVIGATION === */
.navbar {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all .4s var(--ease);
}
.navbar.scrolled {
    padding: 12px 0;
    background: rgba(10,10,15,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}
.nav-container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    font-family: 'Space Grotesk',sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.5px;
}
.logo-bracket { color: var(--accent-1); }
.nav-links { display:flex; gap:32px; }
.nav-link {
    font-size:.875rem;
    font-weight:500;
    color: var(--text-secondary);
    transition: color .3s;
    position: relative;
}
.nav-link::after {
    content:'';
    position:absolute;
    bottom:-4px; left:0;
    width:0; height:2px;
    background: var(--gradient);
    border-radius:2px;
    transition: width .3s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); }
.nav-link:hover::after, .nav-link.active::after { width:100%; }

/* Nav Toggle (Mobile) */
.nav-toggle {
    display:none;
    flex-direction:column;
    gap:5px;
    background:none;
    border:none;
    cursor:pointer;
    padding:4px;
}
.nav-toggle span {
    width:24px; height:2px;
    background: var(--text-primary);
    border-radius:2px;
    transition: all .3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity:0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === HERO === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 100px 24px 60px;
}
.hero-bg-shapes { position:absolute; inset:0; overflow:hidden; z-index:0; }
.shape {
    position:absolute;
    border-radius:50%;
    filter:blur(120px);
    opacity:.4;
    animation: floatShape 20s ease-in-out infinite;
}
.shape-1 {
    width:500px; height:500px;
    background: var(--accent-1);
    top:-10%; right:-5%;
    animation-delay:0s;
}
.shape-2 {
    width:400px; height:400px;
    background: var(--accent-2);
    bottom:-10%; left:-5%;
    animation-delay:-7s;
}
.shape-3 {
    width:300px; height:300px;
    background: var(--accent-3);
    top:40%; left:40%;
    animation-delay:-14s;
}
@keyframes floatShape {
    0%,100% { transform:translate(0,0) scale(1); }
    33% { transform:translate(30px,-30px) scale(1.05); }
    66% { transform:translate(-20px,20px) scale(.95); }
}

.hero-content {
    text-align: center;
    max-width: 800px;
    position: relative;
    z-index: 1;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 8px 20px;
    font-size: .8rem;
    font-weight: 500;
    color: var(--accent-2);
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
    animation: fadeInUp .8s var(--ease) both;
}
.badge-dot {
    width: 8px; height: 8px;
    background: var(--accent-2);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%,100% { opacity:1; transform:scale(1); }
    50% { opacity:.5; transform:scale(.8); }
}
.hero-greeting {
    display: block;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 8px;
    animation: fadeInUp .8s var(--ease) .1s both;
}
.hero-name {
    display: block;
    font-family: 'Space Grotesk',sans-serif;
    font-size: clamp(3rem,8vw,5.5rem);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.1;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp .8s var(--ease) .2s both;
}
.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 16px;
    animation: fadeInUp .8s var(--ease) .3s both;
}
.hero-desc {
    font-size: .95rem;
    color: var(--text-muted);
    max-width: 550px;
    margin: 16px auto 0;
    animation: fadeInUp .8s var(--ease) .4s both;
}
.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 40px;
    animation: fadeInUp .8s var(--ease) .5s both;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 100px;
    font-size: .9rem;
    font-weight: 600;
    transition: all .35s var(--ease);
    cursor: pointer;
    border: none;
    font-family: inherit;
}
.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(108,99,255,.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108,99,255,.45);
}
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}
.btn-outline:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    transform: translateY(-2px);
}
.btn-full { width:100%; justify-content:center; }

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 64px;
    animation: fadeInUp .8s var(--ease) .6s both;
}
.stat { text-align:center; }
.stat-number {
    font-family:'Space Grotesk',sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
}
.stat-plus {
    font-family:'Space Grotesk',sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-1);
}
.stat-label {
    display:block;
    font-size:.8rem;
    color: var(--text-muted);
    margin-top:4px;
}

/* Scroll Indicator */
.scroll-indicator {
    position:absolute;
    bottom:40px;
    left:50%;
    transform:translateX(-50%);
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
    animation: fadeInUp .8s var(--ease) .8s both;
}
.scroll-indicator span {
    font-size:.7rem;
    text-transform:uppercase;
    letter-spacing:2px;
    color: var(--text-muted);
}
.mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-muted);
    border-radius: 14px;
    position: relative;
}
.mouse-wheel {
    width: 3px; height: 8px;
    background: var(--accent-1);
    border-radius: 3px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s ease-in-out infinite;
}
@keyframes scrollWheel {
    0%   { opacity:1; transform:translateX(-50%) translateY(0); }
    100% { opacity:0; transform:translateX(-50%) translateY(12px); }
}

/* === SECTION COMMON === */
.section {
    padding: var(--section-pad) 0;
    position: relative;
}
.section-alt {
    background: var(--bg-secondary);
}
.section-header {
    text-align: center;
    margin-bottom: 64px;
}
.section-tag {
    display:inline-block;
    font-size:.75rem;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:3px;
    color: var(--accent-1);
    margin-bottom:16px;
}
.section-title {
    font-family:'Space Grotesk',sans-serif;
    font-size: clamp(2rem,5vw,3rem);
    font-weight: 700;
    letter-spacing: -1px;
}
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
    background-clip:text;
}

/* === ABOUT === */
.about-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 64px;
    align-items: center;
}
.avatar-wrapper {
    width: 220px;
    height: 220px;
    margin: 0 auto;
    position: relative;
}
.avatar-initials {
    width: 100%; height: 100%;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk',sans-serif;
    font-size: 4rem;
    font-weight: 800;
    color: #fff;
    position: relative;
    z-index: 1;
}
.avatar-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-image: var(--gradient) 1;
    animation: spinRing 8s linear infinite;
    border-radius: 50%;
    border: 2px dashed rgba(108,99,255,.3);
}
@keyframes spinRing { to { transform:rotate(360deg); } }

.about-text p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
}
.about-highlights {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 16px;
    margin-top: 32px;
}
.highlight-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    text-align: center;
    transition: all .35s var(--ease);
}
.highlight-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    border-color: var(--accent-1);
}
.highlight-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}
.highlight-card h4 {
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.highlight-card p {
    font-size: .78rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* === SKILLS === */
.skills-grid {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.skill-card {
    opacity: 0;
    transform: translateY(20px);
    transition: all .6s var(--ease);
}
.skill-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: var(--delay);
}
.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}
.skill-name {
    font-size: .9rem;
    font-weight: 600;
}
.skill-percent {
    font-family:'Space Grotesk',sans-serif;
    font-size: .85rem;
    font-weight: 600;
    color: var(--accent-1);
}
.skill-bar {
    height: 8px;
    background: rgba(255,255,255,.06);
    border-radius: 100px;
    overflow: hidden;
}
.skill-fill {
    height: 100%;
    width: 0;
    background: var(--gradient);
    border-radius: 100px;
    transition: width 1.2s var(--ease);
}
.skill-card.visible .skill-fill {
    width: calc(var(--w) * 1%);
}

/* === PROJECTS === */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px,1fr));
    gap: 24px;
}
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: all .4s var(--ease);
    opacity: 0;
    transform: translateY(30px);
}
.project-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: var(--delay);
}
.project-card::before {
    content:'';
    position:absolute;
    top:0; left:0;
    width:100%; height:3px;
    background: var(--accent, var(--accent-1));
    opacity: 0;
    transition: opacity .35s;
}
.project-card:hover {
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}
.project-card:hover::before { opacity:1; }

.project-visual {
    width: 64px; height: 64px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}
.project-title {
    font-family:'Space Grotesk',sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.project-desc {
    font-size: .88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}
.project-tags {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.tag {
    font-size: .72rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(255,255,255,.05);
    color: var(--text-muted);
    border: 1px solid rgba(255,255,255,.06);
}
.project-link {
    position: absolute;
    top: 28px; right: 28px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all .3s var(--ease);
}
.project-card:hover .project-link {
    background: var(--accent);
    color: #fff;
}

/* === TIMELINE / EXPERIENCE === */
.timeline {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    padding-left: 40px;
}
.timeline::before {
    content:'';
    position:absolute;
    left:14px; top:0;
    width:2px; height:100%;
    background: linear-gradient(to bottom, var(--accent-1), var(--accent-2));
    border-radius:2px;
    opacity:.3;
}
.timeline-item {
    position: relative;
    padding-bottom: 48px;
    opacity: 0;
    transform: translateX(-20px);
    transition: all .6s var(--ease);
}
.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
    transition-delay: var(--delay);
}
.timeline-item:last-child { padding-bottom:0; }
.timeline-dot {
    position:absolute;
    left:-33px; top:6px;
    width:14px; height:14px;
    border-radius:50%;
    background: var(--gradient);
    border: 3px solid var(--bg-secondary);
    z-index:1;
}
.timeline-content {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: all .35s var(--ease);
}
.timeline-content:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-1);
}
.timeline-year {
    font-size:.75rem;
    font-weight:600;
    color: var(--accent-1);
    text-transform:uppercase;
    letter-spacing:1px;
}
.timeline-role {
    font-family:'Space Grotesk',sans-serif;
    font-size:1.15rem;
    font-weight:600;
    margin: 8px 0 4px;
}
.timeline-company {
    font-size:.85rem;
    color: var(--accent-2);
    font-weight:500;
}
.timeline-desc {
    font-size:.88rem;
    color: var(--text-secondary);
    margin-top:12px;
}

/* === CONTACT === */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}
.contact-text {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 32px;
}
.contact-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: .92rem;
    color: var(--text-secondary);
    transition: color .3s;
}
.contact-item:hover { color: var(--accent-1); }
.contact-icon {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.social-links {
    display: flex;
    gap: 12px;
}
.social-link {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all .35s var(--ease);
}
.social-link:hover {
    background: var(--accent-1);
    border-color: var(--accent-1);
    color: #fff;
    transform: translateY(-3px);
}

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.form-group { position:relative; }
.form-input {
    width:100%;
    padding: 18px 20px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family:inherit;
    font-size:.9rem;
    transition: border-color .3s, box-shadow .3s;
    outline: none;
}
.form-input:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(108,99,255,.15);
}
.form-textarea {
    min-height: 140px;
    resize: vertical;
}
.form-label {
    position: absolute;
    left: 20px;
    top: 18px;
    font-size: .9rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: all .25s var(--ease);
    background: transparent;
}
.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
    top: -10px;
    left: 14px;
    font-size: .72rem;
    color: var(--accent-1);
    background: var(--bg-primary);
    padding: 0 6px;
}
/* Fix for section-alt backgrounds */
.section-alt .form-input:focus ~ .form-label,
.section-alt .form-input:not(:placeholder-shown) ~ .form-label {
    background: var(--bg-secondary);
}

/* === FOOTER === */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-logo {
    font-family:'Space Grotesk',sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
}
.footer-copy {
    font-size: .82rem;
    color: var(--text-muted);
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from { opacity:0; transform:translateY(24px); }
    to   { opacity:1; transform:translateY(0); }
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .about-highlights { grid-template-columns:1fr 1fr; }
    .contact-grid { grid-template-columns:1fr; }
    .hero-stats { gap:24px; }
    .projects-grid { grid-template-columns:1fr; }
}

@media (max-width: 768px) {
    :root { --section-pad: 80px; }

    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(10,10,15,.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 100px 40px 40px;
        gap: 24px;
        transition: right .4s var(--ease);
        border-left: 1px solid var(--glass-border);
    }
    .nav-links.open { right:0; }
    .nav-toggle { display:flex; }
    .nav-link { font-size:1rem; }

    .hero-name { letter-spacing:-1px; }
    .hero-stats { flex-direction:column; gap:16px; }
    .about-highlights { grid-template-columns:1fr; }

    .hero-actions { flex-direction:column; align-items:center; }
}
