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

:root {
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-light: #eff6ff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-hover: 0 16px 48px rgba(37,99,235,0.13);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
}

/* ── NAV ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 3rem;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--accent);
}

.nav nav { display: flex; gap: 2.25rem; }

.nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* ── HERO ── */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  gap: 5rem;
  padding: 5rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

.hero-bg-blob {
  position: absolute;
  top: -100px;
  right: -200px;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-photo-wrap,
.hero-text {
  position: relative;
  z-index: 1;
}

.hero-photo-wrap {
  flex-shrink: 0;
  width: 290px;
  height: 290px;
  border-radius: 50%;
  clip-path: circle(50%);
  box-shadow: 0 0 0 5px #bfdbfe, 0 20px 60px rgba(37,99,235,0.2);
}

.hero-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 50%;
}

.hero-text { flex: 1; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid #bfdbfe;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}

.badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
}

.hero-role {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.hero-sub {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  margin-bottom: 2.25rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.hero-tags span {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0.8rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
}

.hero-tags span:hover {
  border-color: #bfdbfe;
  color: var(--accent);
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 4px 14px rgba(37,99,235,0.3);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  box-shadow: 0 8px 24px rgba(37,99,235,0.4);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}

.btn-cv {
  background: var(--bg-alt);
  color: var(--text);
  border: 2px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-cv:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-white {
  background: #fff;
  color: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.btn-white:hover {
  background: #f0f4ff;
  transform: translateY(-2px);
}

.btn-white-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.5);
}

.btn-white-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.8);
  transform: translateY(-2px);
}

/* ── SECTIONS ── */
.section { padding: 6rem 2rem; }
.section-alt { background: var(--bg-alt); }

.container { max-width: 920px; margin: 0 auto; }

.section-title {
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 2.5rem;
  position: relative;
  padding-bottom: 0.875rem;
  letter-spacing: -0.025em;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3rem;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #93c5fd);
  border-radius: 2px;
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.975rem;
}

.about-text strong { color: var(--text); font-weight: 600; }

.about-facts { display: flex; flex-direction: column; gap: 0.6rem; }

.fact {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.fact:hover {
  box-shadow: var(--shadow);
  border-color: #bfdbfe;
}

.fact.highlight {
  border-color: #bfdbfe;
  background: var(--accent-light);
}

.fact-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.fact-link i,
.project-link i {
  vertical-align: middle;
  font-size: 1rem;
}

.fact-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.fact-value { font-size: 0.88rem; color: var(--text); font-weight: 500; }

.fact-link {
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.fact-link:hover { text-decoration: underline; }

/* ── SKILLS ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.skill-group {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.skill-group:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.skill-backend  { border-left-color: #2563eb; }
.skill-frontend { border-left-color: #7c3aed; }
.skill-db       { border-left-color: #0891b2; }
.skill-testing  { border-left-color: #16a34a; }

.skill-group h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.875rem;
}

.skill-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.skill-group ul li {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.skill-group-secondary {
  grid-column: 1 / -1;
  background: var(--accent-light);
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--accent);
}

.skill-group-secondary:hover { transform: none; box-shadow: none; }

.skill-group-secondary h3 { color: var(--text); }

.tags {
  flex-direction: row !important;
  flex-wrap: wrap;
  gap: 0.5rem !important;
}

.tags li {
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  padding: 0.3rem 0.875rem;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

/* ── PROJECTS ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
  display: flex;
  flex-direction: column;
  position: relative;
}

.project-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: #bfdbfe;
}

.project-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-light);
  line-height: 1;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.875rem;
}

.project-card:hover .project-number {
  color: #bfdbfe;
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.875rem;
}

.project-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.project-type {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  white-space: nowrap;
  border: 1px solid #bfdbfe;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  flex: 1;
  line-height: 1.7;
}

.project-stack {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.project-stack li {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
}

.project-link {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.project-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* ── CTA / CONTACT ── */
.cta-section {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
  padding: 7rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

.cta-inner {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cta-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.4);
  padding: 0.35rem 1rem;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}

.cta-section h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

.cta-sub {
  color: rgba(255,255,255,0.92);
  font-size: 1rem;
  margin-bottom: 2.5rem;
  line-height: 1.75;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.cta-email {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.75);
}

/* ── FADE IN ── */
[data-fade] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

[data-fade].fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* ── FOOTER ── */
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer a { color: var(--accent); text-decoration: none; font-weight: 500; }
.footer a:hover { text-decoration: underline; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 3.5rem 2rem;
    gap: 2.5rem;
    min-height: auto;
  }

  .hero-photo-wrap { width: 200px; height: 200px; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .nav { padding: 1rem 1.25rem; }
  .nav nav { gap: 1rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .hero { padding: 3rem 1.5rem; }
}
