/* ==========================================
   RESET & BASE
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #080a0f;
  --bg-2: #0d1117;
  --bg-3: #111620;
  --surface: #141922;
  --surface-2: #1a2130;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text: #e8eaf0;
  --text-muted: #6e7891;
  --text-dim: #3d4558;
  --accent: #4f8ef7;
  --accent-glow: rgba(79, 142, 247, 0.15);
  --accent-2: #7c5cbf;
  --green: #22c55e;
  --font-main: 'Inter', system-ui, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================
   SCROLLBAR
   ========================================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ==========================================
   TYPOGRAPHY
   ========================================== */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
}

a { color: inherit; text-decoration: none; }

/* ==========================================
   LAYOUT HELPERS
   ========================================== */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 48px;
  color: #fff;
}

/* ==========================================
   NAV
   ========================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background var(--transition), border-color var(--transition);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(8, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-links a:hover { color: #fff; }

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600 !important;
  transition: opacity var(--transition) !important;
}

.nav-cta:hover { opacity: 0.85; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  background: rgba(8, 10, 15, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding: 16px 24px 24px;
  gap: 4px;
}

.mobile-menu.open { display: flex; }

.mobile-link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}

.mobile-link:last-child { border-bottom: none; }
.mobile-link:hover { color: #fff; }

/* ==========================================
   HERO
   ========================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79, 142, 247, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 142, 247, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
}

.glow-1 {
  width: 600px;
  height: 600px;
  background: var(--accent);
  top: -200px;
  right: -100px;
  animation: pulse 8s ease-in-out infinite;
}

.glow-2 {
  width: 400px;
  height: 400px;
  background: var(--accent-2);
  bottom: -100px;
  left: -100px;
  animation: pulse 10s ease-in-out infinite reverse;
}

@keyframes pulse {
  0%, 100% { opacity: 0.12; transform: scale(1); }
  50% { opacity: 0.18; transform: scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 64px;
  max-width: 1000px;
  width: 100%;
  padding: 0 24px;
  padding-top: 80px;
}

/* ---------- PORTRAIT ---------- */
.hero-portrait-wrap {
  position: relative;
  flex-shrink: 0;
}

.hero-portrait {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface);
  position: relative;
  z-index: 2;
  border: 2px solid var(--border);
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.portrait-placeholder {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.portrait-placeholder svg {
  width: 100%;
  height: 110%;
}

.portrait-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(79, 142, 247, 0.25);
  z-index: 1;
  animation: ringPulse 3s ease-in-out infinite;
}

.portrait-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,142,247,0.12) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.04); opacity: 1; }
}

/* ---------- HERO TEXT (left-aligned when beside portrait) ---------- */
.hero-text {
  text-align: left;
  flex: 1;
}

.hero-text .hero-badge {
  justify-content: flex-start;
}

.hero-text .hero-actions {
  justify-content: flex-start;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 36px;
  letter-spacing: 0.02em;
}

.badge-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-name {
  display: block;
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-family: var(--font-main);
}

.hero-headline {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 44px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 32px;
  border-radius: var(--radius);
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 0 30px rgba(79, 142, 247, 0.25);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(79, 142, 247, 0.4);
}

.btn-ghost {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 14px 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  color: #fff;
  transform: translateY(-2px);
}

.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, transparent, var(--accent));
  margin: 0 auto;
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

/* ==========================================
   ABOUT
   ========================================== */
.about {
  background: var(--bg-2);
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 20px;
}

.about-text p:last-child { margin-bottom: 0; }

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.stat-icon { font-size: 1.4rem; margin-bottom: 4px; }

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.stat-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  font-family: var(--font-display);
}

/* ==========================================
   WHAT I DO
   ========================================== */
.what-i-do { background: var(--bg); }

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.cap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.cap-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity var(--transition);
}

.cap-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.cap-card:hover::before { opacity: 1; }

.cap-icon {
  width: 44px;
  height: 44px;
  color: var(--accent);
  margin-bottom: 20px;
}

.cap-icon svg { width: 44px; height: 44px; }

.cap-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #fff;
}

.cap-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ==========================================
   CURRENT FOCUS
   ========================================== */
.focus {
  background: var(--bg-2);
}

.focus-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.focus-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(79, 142, 247, 0.2);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 28px;
}

.focus-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 24px;
  color: #fff;
}

.focus-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 40px;
}

.focus-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.focus-tags span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 100px;
  transition: border-color var(--transition), color var(--transition);
}

.focus-tags span:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ==========================================
   SKILLS
   ========================================== */
.skills { background: var(--bg); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition);
}

.skill-group:hover { border-color: var(--border-hover); }

.skill-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.skill-group-icon { font-size: 1.2rem; }

.skill-group-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tags span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(79, 142, 247, 0.15);
  padding: 5px 12px;
  border-radius: 6px;
}

/* ==========================================
   CONTACT
   ========================================== */
.contact {
  background: var(--bg-2);
}

.contact-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(79, 142, 247, 0.2);
  padding: 16px 28px;
  border-radius: var(--radius);
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  word-break: break-all;
  margin-bottom: 28px;
}

.contact-email:hover {
  background: rgba(79, 142, 247, 0.2);
  border-color: rgba(79, 142, 247, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(79, 142, 247, 0.15);
}

.contact-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer p {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ==========================================
   ANIMATIONS (on scroll)
   ========================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 860px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 36px;
    align-items: center;
  }

  .hero-portrait {
    width: 160px;
    height: 160px;
  }

  .hero-text {
    text-align: center;
  }

  .hero-text .hero-badge,
  .hero-text .hero-actions {
    justify-content: center;
  }

  .hero-sub br { display: none; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .capabilities-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .section { padding: 72px 0; }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn-primary, .btn-ghost {
    width: 100%;
    text-align: center;
  }
}
