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

:root {
  --bg:        #0a0a0f;
  --bg-2:      #0f0f1a;
  --bg-card:   #12121f;
  --accent-1:  #7c3aed;
  --accent-2:  #06b6d4;
  --accent-3:  #f59e0b;
  --text:      #e8e8f0;
  --text-muted:#8888aa;
  --border:    rgba(255,255,255,0.08);
  --radius:    12px;
  --radius-lg: 20px;
  --transition: 0.35s cubic-bezier(0.4,0,0.2,1);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;
  --shadow-glow: 0 0 40px rgba(124,58,237,0.25);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  transition: background var(--transition), padding var(--transition);
}

#navbar.scrolled {
  background: rgba(10,10,15,0.9);
  backdrop-filter: blur(16px);
  padding: 14px 48px;
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.dot { color: var(--accent-1); }

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

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

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

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

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
}

.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #7c3aed, transparent 70%);
  top: -100px; left: -100px;
  animation: drift1 12s ease-in-out infinite alternate;
}

.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #06b6d4, transparent 70%);
  bottom: -50px; right: -50px;
  animation: drift2 15s ease-in-out infinite alternate;
}

.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #f59e0b, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: drift3 10s ease-in-out infinite alternate;
  opacity: 0.2;
}

@keyframes drift1 { from { transform: translate(0,0); } to { transform: translate(60px, 40px); } }
@keyframes drift2 { from { transform: translate(0,0); } to { transform: translate(-50px, -30px); } }
@keyframes drift3 { from { transform: translate(-50%,-50%) scale(1); } to { transform: translate(-50%,-50%) scale(1.3); } }

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 24px;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 20px;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero-name em {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 1rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 48px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--accent-1), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124,58,237,0.5);
}

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

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

.btn-full { width: 100%; }

/* ============================================================
   SECTION SHARED
   ============================================================ */
section { padding: 120px 0; }

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 24px;
}

.section-title em {
  font-style: italic;
  color: var(--accent-1);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

/* ============================================================
   ABOUT
   ============================================================ */
#about { background: var(--bg-2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-image-wrap { position: relative; }

.about-image-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 5/6;
  position: relative;
}

.about-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--bg-card);
}

.about-image-placeholder svg {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0; left: 0;
  object-fit: cover;
}

.placeholder-label {
  position: relative;
  z-index: 2;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.about-accent-box {
  position: absolute;
  bottom: -24px;
  right: -24px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow-glow);
}

.accent-num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1;
  color: #fff;
}

.accent-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.8);
  text-align: center;
  margin-top: 4px;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.about-text p strong { color: var(--text); }

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

.stat { display: flex; flex-direction: column; }

.stat-num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* ============================================================
   WORK
   ============================================================ */
#work { background: var(--bg); }

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 320px 280px;
  gap: 20px;
}

.work-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.work-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.work-card--large {
  grid-column: 1 / 3;
}

.work-card-bg {
  position: absolute;
  inset: 0;
  transition: transform var(--transition);
}

.work-card:hover .work-card-bg {
  transform: scale(1.05);
}

.work-card-content {
  position: relative;
  z-index: 2;
  padding: 32px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%);
}

.work-category {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50px;
  padding: 4px 12px;
  margin-bottom: 10px;
  color: var(--text);
}

.work-card h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 6px;
}

.work-card p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
}

/* ============================================================
   SKILLS
   ============================================================ */
#skills { background: var(--bg-2); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.skill-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-1);
  box-shadow: 0 10px 40px rgba(124,58,237,0.2);
}

.skill-icon { font-size: 2.5rem; margin-bottom: 16px; }

.skill-card h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 10px;
}

.skill-card p { font-size: 0.875rem; color: var(--text-muted); }

/* ============================================================
   CONTACT
   ============================================================ */
#contact { background: var(--bg); }

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-left p {
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 400px;
}

.contact-links { display: flex; flex-direction: column; gap: 16px; }

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.contact-link:hover { color: var(--accent-2); }

.contact-link-icon {
  width: 36px; height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group { display: flex; flex-direction: column; }

.contact-form input,
.contact-form select,
.contact-form textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  outline: none;
  appearance: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-muted); }

.contact-form select option { background: var(--bg-2); }

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { border-color: var(--accent-1); }

.contact-form textarea { resize: vertical; min-height: 120px; }

.form-success {
  display: none;
  color: var(--accent-2);
  font-size: 0.85rem;
  text-align: center;
  padding: 8px;
}

.form-success.show { display: block; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 300;
}

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

.footer-socials { display: flex; gap: 20px; }

.footer-socials a {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

/* ============================================================
   SUCCESS MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 60px rgba(124,58,237,0.2);
  transform: scale(0.85) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}

.modal-overlay.show .modal-box {
  transform: scale(1) translateY(0);
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-msg {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 28px;
}

.modal-close-btn {
  min-width: 140px;
}

/* ============================================================
   CHATBOT
   ============================================================ */
.chatbot-wrapper {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.chatbot-bubble {
  width: 58px; height: 58px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(124,58,237,0.5);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

.chatbot-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 36px rgba(124,58,237,0.7);
}

.chatbot-bubble-icon { font-size: 1.4rem; }

.chatbot-unread {
  position: absolute;
  top: -4px; right: -4px;
  width: 18px; height: 18px;
  background: var(--accent-3);
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-unread.hidden { display: none; }

.chatbot-window {
  width: 360px;
  height: 500px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: scale(0.85) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
  transform-origin: bottom right;
}

.chatbot-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.chatbot-header {
  background: linear-gradient(135deg, var(--accent-1), #5b21b6);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chatbot-avatar {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: #fff;
}

.chatbot-header-info { flex: 1; }
.chatbot-name { display: block; font-weight: 600; font-size: 0.9rem; color: #fff; }
.chatbot-status { font-size: 0.72rem; color: rgba(255,255,255,0.75); }

.chatbot-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background var(--transition);
}

.chatbot-close:hover { background: rgba(255,255,255,0.15); color: #fff; }

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.875rem;
  line-height: 1.5;
  animation: msgIn 0.3s ease;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg.bot {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-msg.user {
  background: linear-gradient(135deg, var(--accent-1), #5b21b6);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  animation: msgIn 0.3s ease;
}

.chat-typing span {
  width: 7px; height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingDot 1.2s ease-in-out infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

.chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: flex-start;
}

.quick-reply {
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.4);
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 0.78rem;
  color: var(--accent-2);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.quick-reply:hover {
  background: rgba(124,58,237,0.3);
  border-color: var(--accent-1);
  color: #fff;
}

.chatbot-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}

.chatbot-input-row input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 0.875rem;
  outline: none;
  font-family: var(--font-sans);
  transition: border-color var(--transition);
}

.chatbot-input-row input::placeholder { color: var(--text-muted); }
.chatbot-input-row input:focus { border-color: var(--accent-1); }

#chatSend {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
}

#chatSend:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(124,58,237,0.5);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.5s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 60px; }
  .about-image-wrap { max-width: 420px; margin: 0 auto; }
  .about-accent-box { right: -12px; }
  .work-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: unset;
  }
  .work-card--large { grid-column: 1 / 3; }
  .contact-wrap { grid-template-columns: 1fr; gap: 48px; }
  .contact-left p { max-width: 100%; }
}

@media (max-width: 768px) {
  #navbar { padding: 16px 24px; }
  #navbar.scrolled { padding: 12px 24px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  section { padding: 80px 0; }

  .work-grid {
    grid-template-columns: 1fr;
  }
  .work-card--large { grid-column: 1; }

  .skills-grid { grid-template-columns: 1fr 1fr; }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .chatbot-window { width: calc(100vw - 48px); }
  #navbar { padding: 14px 20px; }
}

@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
  .about-stats { gap: 24px; }
  .hero-cta { flex-direction: column; align-items: center; }
}
