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

:root {
  --bg: transparent;
  --surface: rgba(255,255,255,0.05);
  --surface2: rgba(255,255,255,0.08);
  --accent: #58a6ff;
  --accent2: #3fb950;
  --text: #e6edf3;
  --muted: #8b949e;
  --border: #30363d;
  --radius: 10px;
}

html { scroll-behavior: smooth; }

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body {
  background: linear-gradient(-45deg, #0f172a, #1e1b4b, #0f2744, #0d2137, #1a1035);
  background-size: 400% 400%;
  animation: gradientShift 14s ease infinite;
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,23,42,.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  height: 60px;
  gap: 1rem;
}

nav .brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex: 1;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.6rem;
  flex: 1;
  justify-content: center;
}

nav ul a {
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
  transition: color .2s;
  white-space: nowrap;
}

nav ul a:hover { color: var(--accent); }
nav ul a.active { color: var(--accent); }

/* ── Language dropdown ── */
.lang-wrap {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  padding: 5px 28px 5px 12px;
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%238b949e' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color .2s;
}

.lang-select:hover,
.lang-select:focus {
  border-color: var(--accent);
}

.lang-select option {
  background: #1a2233;
  color: var(--text);
}

/* ── LAYOUT ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── HERO ── */
#bio {
  padding: 5rem 0 3rem;
  display: flex;
  gap: 4rem;
  align-items: flex-start;
}

.avatar {
  flex-shrink: 0;
  width: 320px;
  text-align: center;
}

.avatar-img {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: var(--surface2);
  border: 5px solid #fff;
  box-shadow: 0 30px 60px rgba(0,0,0,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.4rem;
  overflow: hidden;
}

.avatar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.avatar .role {
  font-size: 1rem;
  color: var(--accent);
  margin-top: .4rem;
  font-weight: 600;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: .8rem;
  margin-top: .9rem;
}

.social-icons a {
  color: var(--muted);
  font-size: 1.65rem;
  transition: color .2s;
}

.social-icons a:hover { color: var(--accent); }

.bio-content h2 {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  display: inline-block;
}

.bio-content p {
  color: #cdd9e5;
  max-width: 680px;
  line-height: 1.8;
}

/* ── SECTION ── */
section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 70px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* ── EDUCATION CARDS ── */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  transition: border-color .2s, transform .2s;
}

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

.edu-card .degree  { font-weight: 700; font-size: 1rem; color: var(--text); margin-bottom: .3rem; }
.edu-card .school  { color: var(--accent); font-size: .88rem; font-weight: 600; margin-bottom: .4rem; }
.edu-card .dates   { color: var(--muted); font-size: .8rem; margin-bottom: .6rem; }
.edu-card .focus   { color: #cdd9e5; font-size: .85rem; }

/* ── PROJECTS PAGE ── */
.proj-lead {
  color: #cdd9e5;
  max-width: 760px;
  margin-bottom: 2.2rem;
}

.proj-article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.2rem;
  margin-bottom: 1.6rem;
  transition: border-color .2s;
}

.proj-article:hover { border-color: var(--accent); }

.proj-h {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.proj-meta {
  color: var(--accent);
  font-size: .9rem;
  font-weight: 600;
  margin-top: .3rem;
}

.proj-date {
  color: var(--muted);
  font-size: .82rem;
  margin-top: .2rem;
  margin-bottom: 1.2rem;
}

.proj-sub {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent2);
  margin-top: 1.4rem;
  margin-bottom: .5rem;
}

.proj-p {
  color: #cdd9e5;
  font-size: .92rem;
  line-height: 1.8;
  max-width: 800px;
}

.proj-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.6rem;
  padding: .5rem 1rem;
  background: rgba(88,166,255,.12);
  border: 1px solid var(--accent);
  border-radius: 20px;
  color: var(--accent);
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, transform .2s;
}

.proj-link:hover {
  background: rgba(88,166,255,.22);
  transform: translateY(-2px);
}

/* ── TIMELINE ── */
.timeline {
  position: relative;
  padding-left: 2.2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 0; bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.85rem; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.timeline-item:last-child { margin-bottom: 0; }

.tl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: .3rem;
  margin-bottom: .3rem;
}

.tl-title   { font-weight: 700; font-size: 1rem; color: var(--text); }
.tl-dates   { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.tl-company { color: var(--accent2); font-size: .9rem; font-weight: 600; margin-bottom: .7rem; }

.tl-bullets { list-style: none; padding: 0; }

.tl-bullets li {
  position: relative;
  padding-left: 1.1rem;
  color: #cdd9e5;
  font-size: .875rem;
  margin-bottom: .4rem;
  line-height: 1.6;
}

.tl-bullets li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ── LANGUAGES ── */
.lang-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: flex-start;
}

.lang-item { display: flex; flex-direction: column; align-items: center; gap: .7rem; }

.circle-wrap { position: relative; width: 90px; height: 90px; }
.circle-wrap svg { transform: rotate(-90deg); }
.circle-bg { fill: none; stroke: var(--surface2); stroke-width: 8; }
.circle-fg { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }

.circle-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  color: var(--text);
}

.lang-name { color: var(--muted); font-size: .85rem; text-align: center; }

/* ── SKILLS TABLE ── */
.skills-table { display: flex; flex-direction: column; gap: .6rem; max-width: 420px; }

.skill-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1.2rem;
}

.skill-name  { font-weight: 600; color: var(--text); }
.skill-level { font-size: .8rem; font-weight: 600; padding: .2rem .7rem; border-radius: 20px; }
.skill-level.advanced  { background: rgba(88,166,255,.15); color: #58a6ff; }
.skill-level.proficient{ background: rgba(63,185,80,.15);  color: #3fb950; }
.skill-level.basic     { background: rgba(139,148,158,.15);color: #8b949e; }

/* ── CONTACT ── */
#contact { padding: 3rem 0 5rem; }

.contact-list { list-style: none; display: flex; flex-direction: column; gap: .9rem; }

.contact-list li { display: flex; align-items: center; gap: .9rem; color: #cdd9e5; font-size: .95rem; }
.contact-list li i { color: var(--accent); width: 1.2rem; text-align: center; }
.contact-list a { color: var(--accent); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

footer {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .8rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 780px) {
  nav {
    height: auto;
    padding: .7rem 1rem;
    flex-wrap: wrap;
    gap: .6rem;
  }

  nav .brand { flex: none; width: 100%; }

  nav ul {
    flex: none;
    gap: .7rem;
    justify-content: flex-start;
    flex-wrap: wrap;
    order: 3;
    width: 100%;
  }

  .lang-wrap {
    flex: none;
    margin-left: auto;
  }

  #bio { flex-direction: column; align-items: center; text-align: center; }
  .avatar { width: 100%; }
  .avatar-img { width: 200px; height: 200px; }
  .tl-header { flex-direction: column; }
  .lang-grid { gap: 1.5rem; justify-content: center; }
  .proj-article { padding: 1.5rem 1.4rem; }
}
