/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #0a0e17;
  color: #c9d1d9;
  line-height: 1.7;
  overflow-x: hidden;
}
a { color: #58a6ff; text-decoration: none; transition: color .2s; }
a:hover { color: #79c0ff; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== Utilities ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #e6edf3;
  margin-bottom: 12px;
}
.section-subtitle {
  color: #7d8590;
  font-size: 1.05rem;
  margin-bottom: 48px;
}
.accent { color: #58a6ff; }
.gradient-text {
  background: linear-gradient(135deg, #58a6ff 0%, #3fb950 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 14, 23, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #21262d;
  padding: 0 24px;
  transition: background .3s;
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.navbar-brand {
  font-size: 1.25rem; font-weight: 700; color: #e6edf3;
  display: flex; align-items: center; gap: 8px;
}
.navbar-brand span { color: #58a6ff; }
.navbar-links { display: flex; gap: 28px; }
.navbar-links a {
  color: #7d8590; font-size: .9rem; font-weight: 500;
  transition: color .2s;
}
.navbar-links a:hover { color: #e6edf3; }
.hamburger {
  display: none; background: none; border: none; color: #c9d1d9;
  font-size: 1.5rem; cursor: pointer;
}

/* ===== Language Switcher ===== */
.lang-switch {
  display: flex;
  gap: 4px;
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 3px;
  margin-left: 16px;
}
.lang-btn {
  background: transparent;
  border: none;
  color: #7d8590;
  font-size: .78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.lang-btn:hover { color: #c9d1d9; }
.lang-btn.active {
  background: #58a6ff;
  color: #fff;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: 64px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -50%; right: -30%;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(88,166,255,.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { max-width: 680px; }
.hero-label {
  display: inline-block;
  background: rgba(88,166,255,.1);
  color: #58a6ff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid rgba(88,166,255,.2);
}
.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  color: #e6edf3;
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero p {
  font-size: 1.15rem;
  color: #7d8590;
  margin-bottom: 36px;
  max-width: 560px;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
}
.btn-primary {
  background: #238636;
  color: #fff;
}
.btn-primary:hover { background: #2ea043; color: #fff; }
.btn-outline {
  background: transparent;
  color: #c9d1d9;
  border: 1px solid #30363d;
}
.btn-outline:hover { border-color: #58a6ff; color: #58a6ff; }

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-text p { margin-bottom: 16px; color: #8b949e; }
.about-text p strong { color: #e6edf3; }
.info-card {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 12px;
  padding: 28px;
}
.info-card h3 { color: #e6edf3; font-size: 1.1rem; margin-bottom: 16px; }
.info-item {
  display: flex; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #21262d;
  font-size: .9rem;
}
.info-item:last-child { border-bottom: none; }
.info-item .label { color: #7d8590; }
.info-item .value { color: #c9d1d9; font-weight: 500; }

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.skill-category {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 12px;
  padding: 24px;
  transition: border-color .2s;
}
.skill-category:hover { border-color: #30363d; }
.skill-category h3 {
  color: #e6edf3; font-size: 1rem;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.skill-category h3 .icon { font-size: 1.2rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
  background: rgba(88,166,255,.08);
  color: #58a6ff;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 500;
  border: 1px solid rgba(88,166,255,.15);
}

/* ===== Experience Carousel ===== */
.carousel-wrapper {
  position: relative;
  max-width: 750px;
  margin: 0 auto;
}
.carousel-viewport {
  overflow: hidden;
  border-radius: 14px;
}
.carousel-track {
  display: flex;
  transition: transform .45s cubic-bezier(.4, 0, .2, 1);
}
.carousel-slide {
  min-width: 100%;
  padding: 0 4px;
}
.exp-card {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 14px;
  padding: 36px 32px;
  min-height: 320px;
  position: relative;
  overflow: hidden;
}
.exp-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #58a6ff, #3fb950);
}
.exp-period {
  display: inline-block;
  background: rgba(88,166,255,.1);
  color: #58a6ff;
  padding: 4px 14px;
  border-radius: 16px;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 16px;
  border: 1px solid rgba(88,166,255,.2);
}
.exp-title { color: #e6edf3; font-size: 1.3rem; margin-bottom: 4px; }
.exp-company { color: #7d8590; font-size: .95rem; margin-bottom: 20px; }
.exp-list { padding-left: 0; }
.exp-list li {
  color: #8b949e; font-size: .9rem; margin-bottom: 10px;
  padding-left: 20px; position: relative; line-height: 1.6;
}
.exp-list li::before {
  content: '';
  position: absolute; left: 0; top: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #58a6ff;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid #30363d;
  background: rgba(22, 27, 34, .9);
  color: #c9d1d9;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  backdrop-filter: blur(8px);
}
.carousel-btn:hover {
  border-color: #58a6ff;
  color: #58a6ff;
  background: rgba(22, 27, 34, 1);
}
.carousel-prev { left: -56px; }
.carousel-next { right: -56px; }
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.carousel-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #21262d;
  border: none;
  cursor: pointer;
  transition: all .25s;
  padding: 0;
}
.carousel-dot.active {
  background: #58a6ff;
  box-shadow: 0 0 8px rgba(88,166,255,.4);
}
@media (max-width: 900px) {
  .carousel-prev { left: 8px; }
  .carousel-next { right: 8px; }
  .carousel-btn { width: 36px; height: 36px; font-size: .95rem; }
  .exp-card { padding: 28px 20px; }
}

/* ===== Projects ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 20px;
}
.project-card {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 12px;
  padding: 28px;
  transition: all .25s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--card-color, #58a6ff), transparent);
  opacity: 0;
  transition: opacity .25s;
}
.project-card:hover {
  border-color: #30363d;
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.project-card:hover::before { opacity: 1; }
.project-card .card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.project-card .card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  background: rgba(88,166,255,.1);
  color: #58a6ff;
}
.project-card .card-number {
  font-size: .75rem;
  color: #484f58;
  font-weight: 700;
}
.project-card h3 {
  color: #e6edf3;
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.project-card p {
  color: #7d8590;
  font-size: .88rem;
  flex: 1;
  margin-bottom: 16px;
}
.project-card .card-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 14px;
}
.project-card .card-tag {
  font-size: .72rem;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(88,166,255,.06);
  color: #7d8590;
  border: 1px solid #21262d;
}
.project-card .card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #21262d;
  font-size: .82rem;
}
.project-card .tests {
  color: #3fb950;
  font-weight: 600;
}
.project-card .arrow { color: #484f58; transition: color .2s; }
.project-card:hover .arrow { color: #58a6ff; }

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.contact-card {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: border-color .2s;
}
.contact-card:hover { border-color: #30363d; }
.contact-card .contact-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}
.contact-card h3 { font-size: .9rem; color: #7d8590; margin-bottom: 6px; }
.contact-card .contact-value { color: #e6edf3; font-weight: 500; font-size: .95rem; }

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid #21262d;
  color: #484f58;
  font-size: .85rem;
}

/* ===== Project Detail Page ===== */
.project-hero {
  padding-top: 120px;
  padding-bottom: 40px;
}
.breadcrumb {
  font-size: .85rem;
  margin-bottom: 24px;
}
.breadcrumb a { color: #7d8590; }
.breadcrumb a:hover { color: #58a6ff; }
.breadcrumb .sep { color: #484f58; margin: 0 8px; }
.project-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #e6edf3;
  margin-bottom: 12px;
}
.project-hero .tagline {
  font-size: 1.15rem;
  color: #7d8590;
  margin-bottom: 24px;
  max-width: 700px;
}
.project-meta {
  display: flex; gap: 24px; flex-wrap: wrap;
  margin-bottom: 28px;
}
.meta-badge {
  display: flex; align-items: center; gap: 6px;
  background: #161b22;
  border: 1px solid #21262d;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: .85rem;
  color: #c9d1d9;
}
.meta-badge .meta-icon { font-size: 1rem; }
.meta-badge .meta-label { color: #7d8590; }

.project-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding-bottom: 80px;
}
.project-main h2 {
  font-size: 1.4rem; color: #e6edf3; margin-bottom: 16px;
  margin-top: 40px;
  padding-bottom: 8px;
  border-bottom: 1px solid #21262d;
}
.project-main h2:first-child { margin-top: 0; }
.project-main p { color: #8b949e; margin-bottom: 12px; }
.project-main ul { padding-left: 0; margin-bottom: 16px; }
.project-main li {
  color: #8b949e; font-size: .92rem; margin-bottom: 8px;
  padding-left: 20px; position: relative;
}
.project-main li::before {
  content: '';
  position: absolute; left: 0; top: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #58a6ff;
}

.project-sidebar .sidebar-card {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.sidebar-card h3 {
  font-size: .95rem; color: #e6edf3;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.tech-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-item {
  background: rgba(88,166,255,.06);
  color: #58a6ff;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: .78rem;
  font-weight: 500;
  border: 1px solid rgba(88,166,255,.12);
}
.pattern-list li {
  padding: 8px 0;
  border-bottom: 1px solid #21262d;
  font-size: .88rem;
  color: #8b949e;
}
.pattern-list li:last-child { border-bottom: none; }
.endpoint-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}
.endpoint-table th {
  text-align: left;
  padding: 10px 12px;
  background: #161b22;
  color: #7d8590;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid #21262d;
}
.endpoint-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #161b22;
  font-size: .88rem;
  color: #8b949e;
}
.endpoint-table .method {
  font-weight: 700;
  font-size: .75rem;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}
.method-get { background: rgba(63,185,80,.12); color: #3fb950; }
.method-post { background: rgba(88,166,255,.12); color: #58a6ff; }
.method-put { background: rgba(210,153,34,.12); color: #d29922; }
.method-delete { background: rgba(248,81,73,.12); color: #f85149; }
.btn-demo {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #238636, #2ea043);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  transition: all .2s;
  border: 1px solid #2ea043;
  margin-bottom: 10px;
}
.btn-demo:hover {
  background: linear-gradient(135deg, #2ea043, #3fb950);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46,160,67,.3);
}
.btn-github {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 14px;
  background: #21262d;
  color: #e6edf3;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  transition: all .2s;
  border: 1px solid #30363d;
}
.btn-github:hover {
  background: #30363d;
  color: #fff;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero h1 { font-size: 2.2rem; }
  .about-grid { grid-template-columns: 1fr; }
  .project-body { grid-template-columns: 1fr; }
  .project-sidebar { order: -1; }
}
@media (max-width: 640px) {
  .navbar-links { display: none; }
  .navbar-links.active {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(10,14,23,.98);
    padding: 20px 24px;
    border-bottom: 1px solid #21262d;
    gap: 16px;
  }
  .hamburger { display: block; }
  .lang-switch { margin-left: auto; margin-right: 12px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-buttons { flex-direction: column; }
  .projects-grid { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .project-hero h1 { font-size: 1.8rem; }
  .project-meta { gap: 10px; }
}
