:root{
--bg:#ffffff;
--surface:#f8fafc;
--text:#1e293b;
--border:#e2e8f0;
--accent:#2563eb;
}

[data-theme="dark"]{
--bg:#0f172a;
--surface:#1e293b;
--text:#f8fafc;
--border:#334155;
--accent:#60a5fa;
}

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

html{
scroll-behavior:smooth;
}

body{
font-family:Inter,sans-serif;
background:var(--bg);
color:var(--text);
}

.topbar{
position:sticky;
top:0;
background:var(--bg);
border-bottom:1px solid var(--border);
padding:15px 40px;
display:flex;
justify-content:space-between;
align-items:center;
z-index:100;
}

nav{
display:flex;
gap:20px;
align-items:center;
}

nav a{
text-decoration:none;
color:var(--text);
}

.layout{
max-width:1400px;
margin:auto;
display:grid;
grid-template-columns:320px 1fr;
gap:50px;
padding:40px;
}

.sidebar{
position:sticky;
top:100px;
height:max-content;
}

.profile-image{
width:50%;
border-radius:14px;
margin-bottom:20px;
}

.links{
display:flex;
flex-direction:column;
gap:10px;
margin:20px 0;
}

.cv-btn{
display:block;
padding:12px;
background:var(--accent);
color:white;
text-align:center;
border-radius:10px;
text-decoration:none;
}

main section{
margin-bottom:70px;
}

h2{
margin-bottom:25px;
}

.card{
background:var(--surface);
border:1px solid var(--border);
padding:20px;
border-radius:12px;
margin-bottom:15px;
}

.project-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
gap:20px;
}

.project-card{
background:var(--surface);
border:1px solid var(--border);
border-radius:12px;
overflow:hidden;
}

.project-card img{
width:100%;
height:220px;
object-fit:cover;
}

.project-content{
padding:20px;
}

.timeline-item{
border-left:3px solid var(--accent);
padding-left:20px;
margin-bottom:25px;
}

.pub-card{
display:flex;
gap:20px;
padding:20px;
margin-bottom:20px;
background:var(--surface);
border:1px solid var(--border);
border-radius:12px;
}

.pub-card img{
width:180px;
height:110px;
object-fit:cover;
border-radius:8px;
}

.filter-btn{
padding:8px 14px;
margin-right:8px;
margin-bottom:20px;
cursor:pointer;
}

@media(max-width:900px){

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

.sidebar{
position:relative;
top:0;
}
}
