/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a0d13;
  --bg-alt:    #0f1219;
  --surface:   #151a24;
  --surface-2: #1c2333;
  --border:    rgba(255,255,255,0.07);
  --text:      #e2e8f0;
  --text-muted:#8892a4;
  --accent-1:  #6366f1;
  --accent-2:  #8b5cf6;
  --accent-3:  #06b6d4;
  --green:     #10b981;
  --font:      'Inter', system-ui, sans-serif;
  --mono:      'JetBrains Mono', monospace;
  --radius:    12px;
  --radius-lg: 20px;
  --shadow:    0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
strong { font-weight: 600; color: var(--text); }

/* =============================================
   UTILITIES
   ============================================= */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.accent { color: var(--accent-1); }
.mono { font-family: var(--mono); }

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff;
  box-shadow: 0 0 20px rgba(99,102,241,0.3);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(99,102,241,0.5);
}

.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  background: var(--surface-2);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--accent-1);
  border: 1px solid var(--accent-1);
  padding: 12px 28px;
}
.btn--outline:hover {
  background: rgba(99,102,241,0.1);
  transform: translateY(-2px);
}

.btn--sm { padding: 7px 16px; font-size: 0.85rem; }
.btn--lg { padding: 14px 32px; font-size: 1rem; }

/* =============================================
   TAGS
   ============================================= */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.tag--new {
  background: rgba(99,102,241,0.12);
  color: #a5b4fc;
  border-color: rgba(99,102,241,0.3);
}
.tag--sm { padding: 3px 10px; font-size: 0.75rem; }

/* =============================================
   SECTION COMMONS
   ============================================= */
.section {
  padding: 100px 0;
}
.section--alt {
  background: var(--bg-alt);
}
.section__header {
  text-align: center;
  margin-bottom: 64px;
}
.section__label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 12px;
}
.section__title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
}

/* =============================================
   NAVIGATION
   ============================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: var(--transition);
}
.nav.scrolled {
  background: rgba(10, 13, 19, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.nav__logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav__links a:hover { color: var(--text); }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
}
.hero__glow--1 {
  width: 600px; height: 600px;
  top: -100px; left: -100px;
  background: radial-gradient(circle, var(--accent-1), transparent 60%);
  animation: float1 8s ease-in-out infinite;
}
.hero__glow--2 {
  width: 500px; height: 500px;
  bottom: -50px; right: -50px;
  background: radial-gradient(circle, var(--accent-3), transparent 60%);
  animation: float2 10s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, 20px); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, -30px); }
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-top: 80px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  color: #6ee7b7;
  margin-bottom: 24px;
}
.hero__badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 6px var(--green); }
  50% { box-shadow: 0 0 12px var(--green); }
}

.hero__title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 28px;
  line-height: 1.7;
}
.hero__subtitle strong { color: var(--text); }

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 80px;
}

.hero__scroll {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero__scroll-line {
  width: 40px;
  height: 1px;
  background: var(--text-muted);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent-1);
  animation: scroll-line 2s ease-in-out infinite;
}
@keyframes scroll-line {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* =============================================
   ABOUT
   ============================================= */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about__text .section__label { margin-bottom: 12px; }
.about__text .section__title { margin-bottom: 24px; }

.about__desc {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.75;
}
.about__desc strong { color: var(--text); }

.about__stats {
  display: flex;
  gap: 40px;
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.stat__number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}
.stat__label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Code Card */
.about__card-wrap { position: relative; }

.about__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about__card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.about__card-dots {
  display: flex;
  gap: 6px;
}
.about__card-dots span {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.about__card-dots span:nth-child(1) { background: #ff5f57; }
.about__card-dots span:nth-child(2) { background: #ffbd2e; }
.about__card-dots span:nth-child(3) { background: #28c840; }

.about__card-title {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.about__card-code {
  padding: 24px;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.8;
}

/* Syntax colors */
.c-key   { color: #c9d1d9; }
.c-prop  { color: #79c0ff; }
.c-colon { color: #c9d1d9; }
.c-val   { color: #a5d6ff; }
.c-num   { color: #f78166; }
.c-bool  { color: #ff7b72; }
.c-comma { color: #c9d1d9; }
.c-bracket { color: #f0883e; }

/* =============================================
   SKILLS
   ============================================= */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  overflow: hidden;
}
.skill-card:hover {
  border-color: rgba(99,102,241,0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.skill-card--glow {
  border-color: rgba(99,102,241,0.2);
  background: linear-gradient(135deg, var(--surface), rgba(99,102,241,0.05));
}
.skill-card--glow::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3));
}

.skill-card__badge {
  position: absolute;
  top: 16px; right: 16px;
  padding: 3px 10px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
}

.skill-card__icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.skill-card__icon svg { width: 22px; height: 22px; }

.skill-card__icon--php    { background: rgba(119,123,180,0.15); color: #777bb4; }
.skill-card__icon--react  { background: rgba(97,218,251,0.1);  color: #61dafb; }
.skill-card__icon--python { background: rgba(55,118,171,0.15); color: #3776ab; }
.skill-card__icon--ai     { background: rgba(99,102,241,0.15); color: #a5b4fc; }
.skill-card__icon--db     { background: rgba(16,185,129,0.1);  color: #34d399; }
.skill-card__icon--devops { background: rgba(251,146,60,0.1);  color: #fb923c; }

.skill-card__name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.skill-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.skill-card__bar {
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}
.skill-card__bar-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}
.skill-card__bar-fill--accent {
  background: linear-gradient(90deg, var(--accent-2), var(--accent-3));
}
.skill-card.visible .skill-card__bar-fill {
  width: var(--w);
}

/* =============================================
   PROJECTS
   ============================================= */
.projects__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 48px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
}
.project-card:hover {
  border-color: rgba(99,102,241,0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.project-card--featured {
  border-color: rgba(99,102,241,0.2);
}
.project-card--featured::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius-lg) + 1px);
  background: linear-gradient(135deg, rgba(99,102,241,0.3), rgba(139,92,246,0.3), transparent);
  z-index: -1;
  pointer-events: none;
}
.project-card--featured { position: relative; }

.project-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.project-card__icons {
  display: flex;
  align-items: center;
  gap: 16px;
}
.project-card__folder { width: 36px; height: 36px; color: var(--accent-1); }

.project-card__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-muted);
  transition: var(--transition);
}
.project-card__links a:hover { color: var(--text); background: var(--border); }
.project-card__links a svg { width: 16px; height: 16px; }

.project-card__featured-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #a5b4fc;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.25);
  padding: 3px 10px;
  border-radius: 100px;
}

.project-card__title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.project-card__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}
.project-card__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Coming soon card */
.project-card--coming {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    var(--surface),
    var(--surface) 10px,
    rgba(99,102,241,0.02) 10px,
    rgba(99,102,241,0.02) 20px
  );
}
.project-card__coming-inner {
  text-align: center;
  padding: 16px;
}
.project-card__coming-icon {
  width: 52px; height: 52px;
  margin: 0 auto 16px;
  border-radius: 12px;
  background: rgba(99,102,241,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-1);
}
.project-card__coming-icon svg { width: 24px; height: 24px; }

.project-card__soon {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(99,102,241,0.1);
  color: #a5b4fc;
  border: 1px dashed rgba(99,102,241,0.4);
}

.projects__cta { text-align: center; }

/* =============================================
   LEARNING
   ============================================= */
.learning__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.learning-item {
  display: flex;
  gap: 18px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}
.learning-item:hover {
  border-color: rgba(99,102,241,0.25);
  transform: translateY(-2px);
}

.learning-item__icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.learning-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.learning-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =============================================
   CONTACT
   ============================================= */
.contact__wrap {
  position: relative;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 64px 40px;
  background: var(--surface);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 24px;
  overflow: hidden;
}

.contact__glow {
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.12), transparent 70%);
  pointer-events: none;
}

.contact__wrap .section__label { margin-bottom: 12px; }
.contact__wrap .section__title { margin-bottom: 16px; }

.contact__desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.7;
}

.contact__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer__copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer__link {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer__link:hover { color: var(--accent-1); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: 48px; }
  .skills__grid { grid-template-columns: repeat(2, 1fr); }
  .projects__grid { grid-template-columns: 1fr; }
  .learning__grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .skills__grid { grid-template-columns: 1fr; }
  .about__stats { flex-direction: column; gap: 24px; }
  .nav__hamburger { display: flex; }
  .hero__title { font-size: 2.2rem; }
  .contact__wrap { padding: 40px 24px; }
  .footer__inner { flex-direction: column; gap: 8px; text-align: center; }

  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(10,13,19,0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
  }
  .nav__links--open { display: flex; }
  .nav__links a {
    padding: 12px 24px;
    width: 100%;
  }
}

/* Active nav link */
.nav__links a.active { color: var(--text); }
