:root {
    --primary: #58c4dc;
    --primary-light: #7dd3e7;
    --bg-dark: #0f172a;
    --bg-alt: #1e293b;
    --text-high: #f8fafc;
    --text-mid: #94a3b8;
    --text-low: #64748b;
    --border: rgba(255, 255, 255, 0.08);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-mid);
    line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* --- Header --- */
header {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    padding: 1.5rem 0; transition: var(--transition);
}
header.scrolled {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}
nav { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: 'Montserrat'; font-weight: 900; font-size: 1.5rem; color: var(--text-high); }
.logo span { color: var(--primary); }
.nav-links { display: flex; list-style: none; gap: 2.5rem; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text-mid); font-weight: 500; transition: var(--transition); }
.nav-links a:hover { color: var(--primary); }

/* --- Buttons --- */
.btn-primary-v3 {
    background: var(--primary); color: #0f172a !important; 
    padding: 0.7rem 1.5rem; border-radius: 8px; font-weight: 700;
    text-decoration: none; transition: var(--transition); border: none;
}
.btn-primary-v3:hover { background: #fff; transform: translateY(-3px); }

.btn-outline {
    border: 1px solid var(--border); color: var(--text-high);
    padding: 0.7rem 1.5rem; border-radius: 8px; text-decoration: none; transition: var(--transition);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* --- Hero --- */
#hero { padding: 12rem 0 8rem; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 4rem; align-items: center; }
.badge { 
    background: rgba(88, 196, 220, 0.1); color: var(--primary);
    padding: 0.5rem 1rem; border-radius: 50px; font-size: 0.85rem; font-weight: 600;
    margin-bottom: 1.5rem; display: inline-block;
}
h1 { font-family: 'Montserrat'; font-size: 5rem; font-weight: 900; line-height: 1.1; margin-bottom: 2rem; color: var(--text-high); }
h1 span { color: var(--primary); }
.hero-desc { font-size: 1.25rem; max-width: 600px; margin-bottom: 3rem; }
.hero-actions { display: flex; gap: 1.5rem; }

.hero-visual { position: relative; display: flex; justify-content: flex-end; }
.photo-frame {
    width: 380px; height: 380px; border-radius: 40px; overflow: hidden;
    border: 1px solid var(--border); box-shadow: 0 50px 100px rgba(0,0,0,0.5);
    background: var(--bg-alt);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }

.tech-stack-floating {
    position: absolute; bottom: 20px; left: 0;
    display: flex; flex-direction: column; gap: 0.8rem;
}
.tech-stack-floating span {
    background: var(--bg-alt); color: var(--primary); border: 1px solid var(--primary);
    padding: 0.5rem 1.2rem; border-radius: 12px; font-weight: 700; font-size: 0.9rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* --- Sections --- */
section { padding: 8rem 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-family: 'Montserrat'; font-size: 2.5rem; font-weight: 800; margin-bottom: 4rem; color: var(--text-high); }
.section-title span { color: var(--primary); }

/* --- About --- */
.about-flex { display: grid; grid-template-columns: 1.5fr 1fr; gap: 5rem; }
.about-main p { font-size: 1.15rem; margin-bottom: 1.5rem; }
.about-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-item {
    display: flex; align-items: center; gap: 1rem; color: var(--text-high);
    background: var(--bg-dark); padding: 1.5rem; border-radius: 20px; border: 1px solid var(--border);
}
.sidebar-item i { color: var(--primary); }

/* --- Cards & Timeline --- */
.academic-list { display: grid; gap: 2rem; }
.card { background: var(--bg-dark); padding: 2.5rem; border-radius: 24px; border: 1px solid var(--border); transition: var(--transition); }
.card:hover { border-color: var(--primary); transform: translateY(-5px); }
.year { color: var(--primary); font-weight: 800; margin-bottom: 0.5rem; }
.institution { font-weight: 700; color: var(--text-high); margin: 0.2rem 0 1rem; }
.course-tags { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.5rem; }
.course-tags span { background: rgba(255,255,255,0.05); padding: 0.4rem 0.8rem; border-radius: 8px; font-size: 0.85rem; }

.timeline { border-left: 2px solid var(--primary); padding-left: 3rem; margin-left: 1rem; }
.timeline-item { position: relative; margin-bottom: 4rem; }
.time-dot { position: absolute; left: -54px; top: 8px; width: 14px; height: 14px; background: var(--primary); border-radius: 50%; box-shadow: 0 0 15px var(--primary); }
.time-content h3 { font-size: 1.4rem; color: var(--text-high); }
.company { color: var(--primary); font-weight: 700; margin: 0.3rem 0 1.5rem; }
.time-content ul { list-style: none; }
.time-content li { margin-bottom: 0.8rem; position: relative; padding-left: 1.5rem; }
.time-content li::before { content: '→'; position: absolute; left: 0; color: var(--primary); }

/* --- Projects --- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.5rem; }
.project-box {
    background: var(--bg-alt); padding: 2.5rem; border-radius: 24px; border: 1px solid var(--border);
    transition: var(--transition); display: flex; flex-direction: column;
}
.project-box i { color: var(--primary); font-size: 2rem; margin-bottom: 1.5rem; }
.project-box h3 { color: var(--text-high); margin-bottom: 1rem; }
.p-tags { margin-top: auto; display: flex; gap: 0.8rem; padding-top: 1.5rem; }
.p-tags span { color: var(--primary); border: 1px solid var(--primary); padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }
.project-box:hover { background: var(--bg-dark); border-color: var(--primary); transform: scale(1.02); }

/* --- Interests --- */
.interests-flex { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.interest-pill {
    background: var(--bg-dark); border: 1px solid var(--border); padding: 1rem 1.5rem;
    border-radius: 50px; display: flex; align-items: center; gap: 0.8rem; color: var(--text-high);
}

/* --- Contact Section --- */
.contact-card {
    background: linear-gradient(135deg, var(--bg-alt), var(--bg-dark));
    padding: 6rem; border-radius: 40px; text-align: center; border: 1px solid var(--primary);
}
.contact-card h2 { font-family: 'Montserrat'; font-size: 3.5rem; margin-bottom: 3rem; color: var(--text-high); }
.c-links { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.c-phone { font-size: 1.5rem; font-weight: 800; color: var(--primary); }

/* --- Footer --- */
footer { padding: 4rem 0; border-top: 1px solid var(--border); text-align: center; }

/* --- Reveal --- */
.reveal { opacity: 0; transform: translateY(30px); transition: 1s var(--transition); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* --- Responsive --- */
@media (max-width: 992px) {
    h1 { font-size: 3.5rem; }
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-actions { justify-content: center; }
    .hero-visual { justify-content: center; margin-top: 3rem; }
    .about-flex { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .photo-frame { width: 300px; height: 300px; }
}
