/* ===== Design Tokens ===== */
:root {
  --bg: #0a192f;
  --bg-alt: #112240;
  --panel: #112240;
  --slate: #8892b0;
  --slate-light: #a8b2d1;
  --lightest: #ccd6f6;
  --white: #e6f1ff;
  --accent: #64ffda;
  --accent-dim: rgba(100, 255, 218, 0.1);
  --shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--slate);
  line-height: 1.7;
  overflow-x: hidden;
}

a { text-decoration: none; transition: all .25s ease; }
.text-accent { color: var(--accent) !important; }

/* ===== Navbar ===== */
#mainNav {
  background: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  transition: padding .3s ease, box-shadow .3s ease;
}
#mainNav.scrolled { padding: .55rem 0; box-shadow: var(--shadow); }
.navbar-brand { font-size: 1.4rem; color: var(--lightest) !important; font-family: var(--mono); }
#mainNav .nav-link {
  color: var(--lightest);
  font-size: .9rem;
  margin: 0 .35rem;
  position: relative;
}
#mainNav .nav-link::after {
  content: ''; position: absolute; left: .35rem; bottom: 0; height: 2px; width: 0;
  background: var(--accent); transition: width .25s ease;
}
#mainNav .nav-link:hover, #mainNav .nav-link.active { color: var(--accent); }
#mainNav .nav-link:hover::after, #mainNav .nav-link.active::after { width: calc(100% - .7rem); }
.navbar-toggler { border-color: var(--accent); }

/* ===== Buttons ===== */
.btn-accent {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: .9rem;
  padding: .7rem 1.5rem;
}
.btn-accent:hover { background: var(--accent-dim); color: var(--accent); transform: translateY(-3px); }
.btn-outline-light { border-radius: 6px; font-family: var(--mono); font-size: .9rem; }
.btn-outline-light:hover { transform: translateY(-3px); }

/* ===== Hero ===== */
.hero { min-height: 100vh; position: relative; padding-top: 80px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(100,255,218,.08), transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(100,255,218,.05), transparent 40%);
}
.hero-greeting { color: var(--accent); font-family: var(--mono); font-size: 1rem; }
.hero-name {
  color: var(--lightest); font-weight: 800;
  font-size: clamp(2.5rem, 8vw, 5rem); line-height: 1.05; margin-bottom: .25rem;
}
.hero-role {
  color: var(--slate); font-weight: 700;
  font-size: clamp(1.8rem, 6vw, 3.5rem); line-height: 1.05; margin-bottom: 1.5rem;
}
.hero-desc { max-width: 600px; font-size: 1.1rem; margin-bottom: 2rem; }
.hero-desc strong { color: var(--lightest); }
.hero-actions .btn { margin-right: 1rem; margin-bottom: .75rem; }
.hero-social a {
  color: var(--slate-light); font-size: 1.3rem; margin-right: 1.4rem; display: inline-block;
}
.hero-social a:hover { color: var(--accent); transform: translateY(-4px); }
.scroll-down {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  color: var(--accent); font-size: 1.5rem; animation: bob 2s infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,10px); } }

/* ===== Sections ===== */
.section { padding: 6rem 0; }
.section-alt { background: var(--bg-alt); }
.section-title {
  display: flex; align-items: center; gap: .8rem;
  color: var(--lightest); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2rem);
  margin-bottom: 3rem;
}
.section-title .num, .num { color: var(--accent); font-family: var(--mono); font-size: 1.1rem; font-weight: 600; }
.section-title::after {
  content: ''; height: 1px; flex: 1; max-width: 300px;
  background: rgba(136,146,176,.3); margin-left: 1rem;
}
.section p { color: var(--slate); }
.section strong { color: var(--lightest); }

/* ===== About ===== */
.tech-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2,1fr); gap: .4rem; }
.tech-grid li { position: relative; padding-left: 1.4rem; font-family: var(--mono); font-size: .9rem; color: var(--slate-light); }
.tech-grid li::before { content: '▹'; position: absolute; left: 0; color: var(--accent); }
.stats-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.stat {
  background: var(--panel); border: 1px solid rgba(100,255,218,.1);
  border-radius: 10px; padding: 1.6rem 1rem; text-align: center; box-shadow: var(--shadow);
  transition: transform .3s ease, border-color .3s ease;
}
.stat:hover { transform: translateY(-6px); border-color: var(--accent); }
.stat-num { font-size: 2.6rem; font-weight: 800; color: var(--accent); font-family: var(--mono); }
.stat .plus { font-size: 2rem; color: var(--accent); font-weight: 800; }
.stat p { margin: .3rem 0 0; font-size: .82rem; color: var(--slate); }

/* ===== Timeline ===== */
.timeline { position: relative; max-width: 850px; margin: 0 auto; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--accent), transparent);
}
.tl-item { position: relative; padding: 0 0 2.5rem 1.8rem; }
.tl-item::before {
  content: ''; position: absolute; left: -2px; top: 6px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(100,255,218,.08);
}
.tl-date { font-family: var(--mono); font-size: .8rem; color: var(--accent); }
.tl-role { color: var(--lightest); font-weight: 700; font-size: 1.2rem; margin: .25rem 0 0; }
.tl-company { color: var(--slate-light); font-weight: 600; }
.tl-company .type { font-size: .75rem; color: var(--slate); font-weight: 400; }
.tl-list { list-style: none; padding: 0; margin: .8rem 0 0; }
.tl-list li { position: relative; padding-left: 1.4rem; margin-bottom: .4rem; font-size: .95rem; }
.tl-list li::before { content: '▹'; position: absolute; left: 0; color: var(--accent); }

/* ===== Skills ===== */
.skill-card {
  background: var(--panel); border: 1px solid rgba(100,255,218,.08);
  border-radius: 10px; padding: 1.6rem; height: 100%;
  transition: transform .3s ease, border-color .3s ease;
}
.skill-card:hover { transform: translateY(-8px); border-color: var(--accent); }
.skill-card .icon { color: var(--accent); font-size: 1.8rem; margin-bottom: .8rem; }
.skill-card h5 { color: var(--lightest); font-weight: 700; font-size: 1.05rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.skill-tag {
  font-family: var(--mono); font-size: .78rem; color: var(--accent);
  background: var(--accent-dim); padding: .3rem .7rem; border-radius: 20px;
}

/* ===== Projects ===== */
.project-card {
  display: flex; flex-direction: column; color: inherit;
  background: var(--panel); border: 1px solid rgba(100,255,218,.08);
  border-radius: 10px; padding: 1.6rem; height: 100%; box-shadow: var(--shadow);
  transition: transform .3s ease, border-color .3s ease;
}
.project-card:hover { transform: translateY(-8px); border-color: var(--accent); }
.project-card .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.project-card .folder { color: var(--accent); font-size: 2rem; }
.project-card .ext { color: var(--slate); font-size: 1.2rem; }
.project-card:hover .ext { color: var(--accent); transform: translate(2px,-2px); }
.project-card h5 { color: var(--lightest); font-weight: 700; transition: color .2s; }
.project-card:hover h5 { color: var(--accent); }
.project-card p { font-size: .9rem; margin-bottom: 1rem; }
.project-tag {
  margin-top: auto; align-self: flex-start;
  font-family: var(--mono); font-size: .72rem; color: var(--accent);
  background: var(--accent-dim); padding: .25rem .7rem; border-radius: 20px;
}

/* ===== Education ===== */
.edu-card {
  background: var(--panel); border: 1px solid rgba(100,255,218,.08);
  border-radius: 10px; padding: 1.8rem; display: flex; gap: 1.2rem; align-items: center;
  transition: border-color .3s ease;
}
.edu-card:hover { border-color: var(--accent); }
.edu-icon { font-size: 2.6rem; color: var(--accent); }
.edu-card h4 { color: var(--lightest); font-weight: 700; font-size: 1.15rem; margin: 0; }
.edu-school { color: var(--slate-light); margin: .2rem 0; }
.edu-year { font-family: var(--mono); font-size: .82rem; color: var(--accent); }
.lang-row { display: flex; justify-content: space-between; width: 100%; padding: .6rem 0; border-bottom: 1px solid rgba(136,146,176,.15); color: var(--lightest); }
.badge-soft { font-family: var(--mono); font-size: .78rem; color: var(--accent); background: var(--accent-dim); padding: .2rem .7rem; border-radius: 20px; }

/* ===== Contact ===== */
.contact-title { color: var(--lightest); font-weight: 800; font-size: clamp(2rem, 6vw, 3rem); }
.contact-desc { max-width: 560px; margin-bottom: 2.5rem; }
.contact-chip {
  background: var(--panel); border: 1px solid rgba(100,255,218,.1);
  border-radius: 10px; padding: 1rem 1.4rem; color: var(--slate-light);
  display: inline-flex; align-items: center; gap: .6rem; font-family: var(--mono); font-size: .9rem;
  transition: all .25s ease;
}
.contact-chip:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-4px); }
.contact-chip i { color: var(--accent); font-size: 1.1rem; }

/* ===== Footer ===== */
.footer { background: var(--bg); padding: 2.5rem 0; }
.footer p { color: var(--slate); font-family: var(--mono); font-size: .85rem; margin: 0; }
.footer-small { font-size: .78rem !important; opacity: .7; }

/* ===== Back to top ===== */
#backToTop {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999;
  width: 44px; height: 44px; border-radius: 8px;
  background: var(--accent-dim); border: 1px solid var(--accent); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  opacity: 0; visibility: hidden; transform: translateY(20px); transition: all .3s ease;
}
#backToTop.show { opacity: 1; visibility: visible; transform: translateY(0); }
#backToTop:hover { background: var(--accent); color: var(--bg); }

/* ===== Reveal animation ===== */
[data-aos] { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
[data-aos].in { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 575px) {
  .tech-grid { grid-template-columns: 1fr; }
  .section { padding: 4rem 0; }
  .hero-social a { margin-right: 1rem; }
}
