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

:root {
  --bg: #080b11;
  --bg2: #0d1117;
  --surface: #111720;
  --surface2: #161d28;
  --border: #1e2a3a;
  --border2: #243040;
  --text: #e2e8f0;
  --muted: #64748b;
  --dim: #94a3b8;
  --accent: #38bdf8;
  --accent2: #0ea5e9;
  --accent-glow: rgba(56,189,248,0.15);
  --green: #34d399;
  --purple: #a78bfa;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(56,189,248,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 90% 80%, rgba(167,139,250,0.05) 0%, transparent 50%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(56,189,248,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(8,11,17,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 48px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.01em;
}

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

.nav-cta {
  background: var(--accent) !important;
  color: var(--bg) !important;
  padding: 7px 18px;
  border-radius: 6px;
  font-weight: 600 !important;
  transition: box-shadow 0.2s, transform 0.15s !important;
}

.nav-cta:hover {
  box-shadow: 0 0 20px rgba(56,189,248,0.4) !important;
  transform: translateY(-1px);
  color: var(--bg) !important;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dim);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0;
  background: rgba(8,11,17,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  z-index: 99;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  font-size: 15px;
  font-weight: 500;
  color: var(--dim);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--accent); }

/* HERO */
.hero {
  position: relative;
  z-index: 1;
  padding: 150px 48px 100px;
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 80px;
  align-items: center;
  min-height: 100vh;
}

.hero-left {}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.25);
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(42px, 5.5vw, 66px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 24px;
  color: var(--text);
}

.hero h1 .line2 {
  background: linear-gradient(90deg, var(--accent) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 16px;
  color: var(--dim);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 440px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  padding: 13px 26px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: box-shadow 0.2s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  box-shadow: 0 0 24px rgba(56,189,248,0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  padding: 13px 26px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid var(--border2);
  transition: border-color 0.2s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.hero-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.profile-photo-wrap {
  position: relative;
  width: 240px;
  height: 240px;
  margin-bottom: 8px;
}

.profile-photo-wrap::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
  z-index: 0;
}

.profile-photo-wrap::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: var(--bg);
  z-index: 1;
}

.profile-photo {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.glow-ring {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,0.12) 0%, transparent 70%);
  z-index: -1;
}

.hero-stat-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.hero-stat-card:hover {
  border-color: var(--border2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.stat-icon {
  width: 40px; height: 40px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.stat-label {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 3px;
}

.stat-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* SECTIONS */
section {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  padding: 100px 48px;
}

.page-entry { padding-top: 140px; }

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  font-family: 'Space Grotesk', sans-serif;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 14px;
  color: var(--text);
}

.section-sub {
  font-size: 15px;
  color: var(--muted);
  max-width: 500px;
  line-height: 1.75;
  margin-bottom: 52px;
}

/* PROJECTS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.project-card::after {
  content: '↗';
  position: absolute;
  top: 22px; right: 22px;
  font-size: 16px;
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
}

.project-card:hover {
  border-color: rgba(56,189,248,0.3);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(56,189,248,0.1);
  transform: translateY(-3px);
}

.project-card:hover::before { opacity: 1; }
.project-card:hover::after { color: var(--accent); transform: translate(2px,-2px); }

.project-emoji { font-size: 28px; margin-bottom: 18px; }

.project-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
  padding-right: 28px;
  font-family: 'Space Grotesk', sans-serif;
}

.project-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 18px;
}

.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-size: 10px;
  font-weight: 500;
  padding: 3px 10px;
  background: var(--surface2);
  color: var(--dim);
  border-radius: 100px;
  border: 1px solid var(--border);
  letter-spacing: 0.03em;
}

.tag-maintenance {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  background: rgba(251,191,36,0.08);
  color: #fbbf24;
  border-radius: 100px;
  border: 1px solid rgba(251,191,36,0.25);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  transition: border-color 0.2s;
}

.skill-group:hover { border-color: var(--border2); }

.skill-group-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 14px;
  font-family: 'Space Grotesk', sans-serif;
}

.skill-list { display: flex; flex-wrap: wrap; gap: 7px; }

.skill-pill {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  background: var(--surface2);
  color: var(--dim);
  border-radius: 100px;
  border: 1px solid var(--border);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  cursor: default;
}

.skill-pill:hover {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: rgba(56,189,248,0.3);
}

/* CONTACT */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 30px;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.contact-card:hover {
  border-color: rgba(56,189,248,0.3);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(56,189,248,0.1);
  transform: translateY(-3px);
}

.contact-icon {
  width: 48px; height: 48px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.contact-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 5px;
}

.contact-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* FOOTER */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 36px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-name::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent);
}

.footer-links { display: flex; gap: 24px; }

.footer-links a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.footer-copy {
  font-size: 12px;
  color: var(--muted);
  font-family: 'Space Grotesk', sans-serif;
}

/* SCROLL TO TOP */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 200;
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--dim);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 16px rgba(56,189,248,0.2);
}

@media (max-width: 768px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 110px 20px 72px; min-height: auto; }
  .hero-right { order: -1; gap: 0; }
  .profile-photo-wrap { width: 160px; height: 160px; margin-bottom: 0; }
  .hero-stat-card { display: none; }
  section { padding: 72px 20px; }
  .page-entry { padding-top: 100px; }
  .projects-grid { grid-template-columns: 1fr; }
  footer { padding: 28px 20px; flex-direction: column; align-items: flex-start; }
  .footer-links { flex-wrap: wrap; gap: 16px; }
  .footer-links a { font-size: 12px; }
  .contact-grid { grid-template-columns: 1fr; }
}
