@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ---- TOKENS ---- */
:root {
  --accent:    #2563EB;
  --accent-2:  #0EA5E9;
  --bg:        #F8FAFC;
  --surface:   #FFFFFF;
  --surface-2: #F1F5F9;
  --border:    #E2E8F0;
  --text:      #0F172A;
  --muted:     #64748B;
  --tag-bg:    #EFF6FF;
  --tag-text:  #2563EB;
}
[data-theme="dark"] {
  --accent:    #38BDF8;
  --accent-2:  #0EA5E9;
  --bg:        #0B1120;
  --surface:   #141E2E;
  --surface-2: #1E2D42;
  --border:    #1E3A5F;
  --text:      #F1F5F9;
  --muted:     #94A3B8;
  --tag-bg:    #0C2340;
  --tag-text:  #38BDF8;
}

/* ---- RESET ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---- LAYOUT ---- */
section { padding: 6rem 0; }
.container { max-width: 820px; margin: 0 auto; padding: 0 2rem; }
.divider { height: 1px; background: var(--border); }

/* ---- TYPOGRAPHY ---- */
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
h2.section-title {
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 2.5rem;
}

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--text);
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  border: 1.5px solid var(--border);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* ---- TAGS ---- */
.tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.73rem;
  font-weight: 600;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---- SIDE NAV ---- */
.sidenav {
  position: fixed;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.sidenav.visible { opacity: 1; pointer-events: all; }
.sidenav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  text-decoration: none;
  justify-content: flex-start;
}
.sidenav-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.sidenav-item.active .sidenav-dot,
.sidenav-item:hover .sidenav-dot { background: var(--accent); transform: scale(1.4); }
.sidenav-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s, transform 0.2s, color 0.2s;
  white-space: nowrap;
  pointer-events: none;
}
.sidenav-item:hover .sidenav-label,
.sidenav-item.active .sidenav-label { opacity: 1; transform: translateX(0); color: var(--accent); }

/* ---- FLOAT CONTROLS ---- */
.float-controls {
  position: fixed;
  top: 1.5rem; right: 1.5rem;
  z-index: 100;
  display: flex;
  gap: 0.5rem;
}
.btn-ctrl {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, color 0.2s;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.btn-ctrl:hover { border-color: var(--accent); color: var(--accent); }
.btn-lang { padding: 0.3rem 0.75rem 0.3rem 0.4rem; }
.lang-flag {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

/* ---- HERO ---- */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem;
  position: relative;
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute;
  top: 10%; left: 50%;
  transform: translateX(-50%);
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(56,189,248,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 680px;
}
.avatar-wrap {
  position: relative;
  width: 140px; height: 140px;
  margin-bottom: 0.5rem;
}
.avatar-wrap::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), transparent, var(--accent));
  z-index: -1;
  animation: spin 10s linear infinite;
  opacity: 0.5;
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar-img {
  width: 140px; height: 140px;
  border-radius: 50%;
  object-fit: cover;
}
.hero-greeting {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: -0.25rem;
}
.hero-name {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.hero-name em { font-style: normal; color: var(--accent); }
.hero-role {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
}
.hero-tagline {
  font-size: 1.05rem;
  opacity: 0.8;
  max-width: 520px;
  line-height: 1.75;
}
.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }
.scroll-hint {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.scroll-hint span {
  display: block;
  width: 1px; height: 36px;
  background: var(--border);
  animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse { 0%,100%{opacity:0.2} 50%{opacity:0.9} }

/* ---- ABOUT ---- */
#about { background: var(--surface); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.about-heading {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0;
}
.about-heading em { font-style: normal; color: var(--accent); }
.about-text p {
  font-size: 0.95rem;
  line-height: 1.85;
  opacity: 0.85;
  margin-bottom: 1rem;
}
.about-text p:last-of-type { margin-bottom: 0; }
.about-nav-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}
.about-nav-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: border-color 0.2s, color 0.2s;
}
.about-nav-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---- EXPERIENCE ---- */
.timeline { list-style: none; position: relative; padding-left: 1.5rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent 0%, var(--border) 8%, var(--border) 92%, transparent 100%);
}
.timeline-item { padding-left: 1.5rem; padding-bottom: 2.75rem; position: relative; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -4px; top: 8px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}
.timeline-dot.muted { background: var(--muted); }
.timeline-date { font-size: 0.75rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.2rem; }
.timeline-role { font-size: 1rem; font-weight: 700; margin-bottom: 0.1rem; }
.timeline-company { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.75rem; }
.timeline-bullets { list-style: none; display: flex; flex-direction: column; gap: 0.3rem; }
.timeline-bullets li {
  font-size: 0.875rem;
  color: var(--muted);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.55;
}
.timeline-bullets li::before {
  content: 'o';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.65rem;
  top: 0.22rem;
}

/* ---- SKILLS ---- */
#skills { background: var(--surface); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}
.skill-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: border-color 0.2s, transform 0.15s;
}
.skill-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.skill-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.skill-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ---- PROJECTS ---- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}
.project-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(56,189,248,0.1);
}
.project-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.project-title { font-size: 0.97rem; font-weight: 700; line-height: 1.3; }
.project-tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.project-company { font-size: 0.78rem; color: var(--accent-2); font-weight: 600; }
.project-company.anon { color: var(--muted); font-style: italic; font-weight: 400; }
.project-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.6; flex: 1; }

/* ---- EDUCATION ---- */
#education { background: var(--surface); }
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.edu-block-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.edu-item {
  padding: 0.9rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s;
}
.edu-item:last-child { margin-bottom: 0; }
.edu-item:hover { border-color: var(--accent); }
.edu-item-title { font-size: 0.88rem; font-weight: 700; }
.edu-item-sub { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }

/* ---- LANGUAGES ---- */
.lang-grid { display: flex; gap: 1rem; flex-wrap: nowrap; margin-bottom: 2rem; }
.lang-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.75rem;
  text-align: center;
  transition: border-color 0.2s;
  flex: 1;
}
.lang-card:hover { border-color: var(--accent); }
.lang-name { font-size: 1rem; font-weight: 800; }
.lang-level { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }
.hobbies-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.65rem; }
.hobby-pill {
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  transition: border-color 0.2s, color 0.2s;
}
.hobby-pill:hover { border-color: var(--accent); color: var(--accent); }

/* ---- CONTACT ---- */
#contact { background: var(--surface); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.contact-intro p { font-size: 0.95rem; color: var(--muted); line-height: 1.7; margin-bottom: 1.5rem; }
.linkedin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #0A66C2;
  color: #fff;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  transition: opacity 0.2s;
}
.linkedin-btn:hover { opacity: 0.85; }
.contact-form { display: flex; flex-direction: column; gap: 0.9rem; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.form-group input, .form-group textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.88rem;
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
  resize: vertical;
  width: 100%;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { min-height: 90px; }
.form-submit {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  align-self: flex-start;
  font-family: inherit;
  transition: opacity 0.2s;
}
.form-submit:hover { opacity: 0.85; }
.form-success {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 600;
}

/* ---- FOOTER ---- */
footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}
footer a { color: var(--muted); transition: color 0.2s; }
footer a:hover { color: var(--accent); }
.footer-privacy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.78rem;
  font-family: inherit;
  transition: color 0.2s;
  padding: 0;
}
.footer-privacy-btn:hover { color: var(--accent); }

/* ---- THEME ICONS ---- */
.theme-icon { display: block; }
.theme-icon--hidden { display: none; }

/* ---- FORM SUCCESS ---- */
.form-success { display: none; }
.form-success.visible { display: block; }

/* ---- PRIVACY MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 540px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}
.modal h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 1.25rem; }
.modal p { font-size: 0.875rem; color: var(--muted); line-height: 1.75; margin-bottom: 1rem; }
.modal p:last-child { margin-bottom: 0; }
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.2s;
  font-family: inherit;
}
.modal-close:hover { color: var(--text); }

/* ---- RESPONSIVE ---- */
@media (max-width: 720px) {
  .about-grid, .edu-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .sidenav { display: none; }
  .hero-name { font-size: 2.4rem; }
}
