
/* Black & purple portfolio theme */
:root {
  --bg: #0b0b0d;            /* near-black */
  --surface: #111114;       /* darker panel */
  --text: #eaeaf0;          /* light text */
  --muted: #a0a0ad;         /* muted gray */
  --primary: #7c3aed;       /* violet-600 */
  --primary-contrast: #9333ea; /* violet-700 */
  --border: #1a1a1f;        /* dark border */
  --accent: #b794f4;        /* violet-300 */
  --shadow: rgba(0, 0, 0, 0.5);
}

/* Light theme variables */
[data-theme="light"] {
  --bg: #f8f8fc;            /* light background */
  --surface: #ffffff;       /* white panels */
  --text: #1a1a2e;          /* dark text */
  --muted: #5a5a6e;         /* muted dark gray */
  --primary: #7c3aed;       /* violet-600 */
  --primary-contrast: #6d28d9; /* violet-700 */
  --border: #e5e5ea;        /* light border */
  --accent: #8b5cf6;        /* violet-500 */
  --shadow: rgba(0, 0, 0, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body { 
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif; 
  background: var(--bg); 
  color: var(--text); 
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  cursor: default;
}

/* Custom cursor effects */
a, button, .btn, .upload-label {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a:hover, button:hover, .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow);
  border-color: var(--primary);
  cursor: pointer;
}

.container { max-width: 1040px; margin: 0 auto; padding: 0 1rem; }
.section { padding: 3rem 0; }

.site-header { position: sticky; top: 0; background: rgba(17,17,20,0.8); backdrop-filter: saturate(120%) blur(8px); border-bottom: 1px solid var(--border); z-index: 10; }
[data-theme="light"] .site-header { background: rgba(248,248,252,0.9); border-bottom: 1px solid var(--border); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.nav { display: flex; align-items: center; justify-content: space-between; max-width: 1040px; margin: 0 auto; padding: 0.6rem 1rem; flex-wrap: nowrap; }
.logo { display: flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: 0.2px; white-space: nowrap; }
.logo img { width: 30px; height: 30px; }
.nav-links { list-style: none; display: flex; gap: 0.75rem; align-items: center; margin: 0; padding: 0; flex-wrap: nowrap; }
.nav-links li.desktop-resume { margin-left: 1rem; }
.nav-links li.mobile-resume { display: none; }
.nav-links a { color: var(--text); text-decoration: none; padding: 0.4rem 0.65rem; border-radius: 8px; white-space: nowrap; transition: all 0.2s ease; position: relative; font-weight: 500; }
.nav-links a:hover { 
  background: rgba(124, 58, 237, 0.15); 
  color: var(--primary); 
  transform: scale(1.05);
}
.nav-links a:active,
.nav-links a.active {
  background: rgba(124, 58, 237, 0.2);
  color: var(--primary);
  font-weight: 600;
}
[data-theme="light"] .nav-links a:hover {
  background: rgba(124, 58, 237, 0.1);
  color: var(--primary);
}
.nav-toggle { display: none; }

/* Theme toggle button */
.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  list-style: none;
}

/* Mobile theme toggle - show on mobile, hide on desktop */
.mobile-theme-toggle {
  display: none;
}

/* Desktop theme toggle - show on desktop, hide on mobile */
.desktop-theme-toggle {
  display: block;
}

.theme-toggle:hover {
  background: var(--primary);
  transform: scale(1.1) rotate(20deg);
}

.hero { background: radial-gradient(1000px 400px at 10% -10%, rgba(124,58,237,0.25), transparent), radial-gradient(800px 400px at 90% -20%, rgba(147,51,234,0.2), transparent); border-bottom: 1px solid var(--border); transition: background 0.3s ease; }
[data-theme="light"] .hero { background: radial-gradient(1000px 400px at 10% -10%, rgba(124,58,237,0.15), transparent), radial-gradient(800px 400px at 90% -20%, rgba(147,51,234,0.1), transparent); }
.intro { padding: 3.5rem 1rem; }
.intro-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 2rem; align-items: center; }
.intro h1 { font-size: 2.4rem; margin: 0; }
.subtitle { color: var(--accent); font-weight: 600; margin-top: 0.3rem; }
.tagline { margin: 0.75rem 0 1.25rem; max-width: 680px; }

.intro-photo { display: flex; justify-content: center; }
.photo-wrapper { position: relative; display: inline-block; }
.intro-photo img { width: 220px; height: 220px; object-fit: cover; border-radius: 0; border: none; box-shadow: none; transition: transform 0.3s ease; background: transparent; }
.intro-photo img:hover { transform: scale(1.05); box-shadow: none; }

/* Photo upload overlay */
.photo-upload-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  border-radius: 0 0 16px 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}

.photo-wrapper:hover .photo-upload-overlay {
  opacity: 1;
}

.upload-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  background: var(--primary);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.upload-label:hover {
  background: var(--primary-contrast);
  transform: scale(1.05);
}

.upload-icon {
  font-size: 1.2rem;
}

#photoUpload {
  display: none;
}

.btn { display: inline-block; border: 1px solid var(--border); color: var(--text); text-decoration: none; padding: 0.7rem 1.05rem; border-radius: 10px; transition: all 0.3s ease; }
.btn.primary { background: var(--primary); color: #ffffff; font-weight: 700; border: none; }
.btn.primary:hover { background: var(--primary-contrast); box-shadow: 0 6px 16px rgba(124,58,237,0.4); }
.btn:hover { background: var(--surface); border-color: var(--primary); }
[data-theme="light"] .btn { border-color: var(--border); background: var(--surface); }
[data-theme="light"] .btn:hover { background: var(--bg); }
[data-theme="light"] .btn.primary { background: var(--primary); color: #ffffff; font-weight: 700; }
[data-theme="light"] .btn.primary:hover { background: var(--primary-contrast); color: #ffffff; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem; margin-bottom: 1rem; }
.card header { display: flex; align-items: baseline; justify-content: space-between; }
.card .meta { color: var(--muted); font-size: 0.95rem; }

/* Education styling */
.education-item { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.education-item:hover { transform: translateY(-4px); box-shadow: 0 6px 20px var(--shadow); }
.education-header { display: flex; gap: 1rem; align-items: flex-start; }
.education-icon { width: 48px; height: 48px; color: var(--primary); flex-shrink: 0; }
.education-item h3 { font-size: 1.1rem; margin: 0 0 0.5rem 0; color: var(--text); }
.education-item .meta { display: block; margin-bottom: 0.25rem; }

/* About section styling */
.about-content { max-width: 800px; margin: 0 auto; }
.about-highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.highlight-item { display: flex; gap: 1rem; align-items: flex-start; padding: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; transition: all 0.3s ease; }
.highlight-item:hover { transform: translateY(-4px); box-shadow: 0 6px 20px var(--shadow); border-color: var(--primary); }
.highlight-item svg { width: 40px; height: 40px; color: var(--primary); flex-shrink: 0; }
.highlight-item h3 { font-size: 1rem; margin: 0 0 0.5rem 0; color: var(--text); }
.highlight-item p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.pill-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; }
.pill-list li { 
  background: #15151a; 
  border: 1px solid var(--border); 
  padding: 0.4rem 0.65rem; 
  border-radius: 999px; 
  font-size: 0.9rem; 
  transition: all 0.2s ease; 
  cursor: default;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.pill-list li svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
[data-theme="light"] .pill-list li { background: var(--surface); }
.pill-list li:hover { 
  background: var(--primary); 
  color: white; 
  transform: scale(1.05); 
  border-color: var(--primary);
}
.pill-list li:hover svg {
  transform: scale(1.2);
}

.muted { color: var(--muted); }

.contact-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 1rem; }
.contact-card { display: flex; align-items: center; gap: 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0.75rem; color: var(--text); text-decoration: none; transition: all 0.3s ease; }
.contact-card:hover { border-color: var(--primary); transform: translateX(4px); box-shadow: 0 4px 12px var(--shadow); }
.contact-card span { font-size: 1.4rem; }
.contact-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; background: var(--primary); border-radius: 12px; color: white; flex-shrink: 0; }
.contact-icon svg { width: 24px; height: 24px; }
.contact-card:hover .contact-icon { background: var(--primary-contrast); transform: scale(1.1); }

/* Form styles */
form label { display: block; margin: 0.75rem 0; }
form label span { display: block; margin-bottom: 0.35rem; font-weight: 600; }
input, textarea { width: 100%; padding: 0.6rem 0.75rem; border-radius: 10px; border: 1px solid var(--border); background: #0f0f12; color: var(--text); transition: all 0.2s ease; }
[data-theme="light"] input, [data-theme="light"] textarea { background: var(--bg); }
input:focus, textarea:focus { outline: 2px solid rgba(124,58,237,0.5); border-color: var(--primary); transform: scale(1.01); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: 0.75rem; align-items: center; }

.site-footer { border-top: 1px solid var(--border); padding: 1rem 0; text-align: center; color: var(--muted); }

/* Responsive nav & layout */
@media (max-width: 1100px) {
  .nav-links { gap: 0.5rem; }
  .nav-links a { padding: 0.4rem 0.5rem; font-size: 0.9rem; }
  .logo span { font-size: 0.95rem; }
  .btn.primary { padding: 0.6rem 0.9rem; font-size: 0.9rem; }
}

@media (max-width: 820px) {
  /* Show mobile theme toggle, hide desktop theme toggle */
  .mobile-theme-toggle {
    display: inline-block;
    margin-left: auto;
    margin-right: 0.75rem;
  }
  .desktop-theme-toggle {
    display: none;
  }
  
  .nav-links { display: none; position: absolute; right: 1rem; top: 56px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.5rem; flex-direction: column; align-items: flex-start; flex-wrap: wrap; box-shadow: 0 4px 12px var(--shadow); z-index: 100; min-width: 200px; }
  [data-theme="light"] .nav-links { box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links li.mobile-resume { display: block; }
  .nav-links li.desktop-resume { display: none; }
  .nav-links a { width: 100%; text-align: left; display: block; }
  .nav-toggle { display: inline-block; background: transparent; border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 0.35rem 0.6rem; font-size: 1.2rem; cursor: pointer; transition: all 0.2s ease; }
  .nav-toggle:hover { background: var(--primary); color: white; }
  .intro-grid { grid-template-columns: 1fr; }
  .intro-photo { margin-top: 1.5rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .intro h1 { font-size: 2rem; }
  .intro-photo img { width: 180px; height: 180px; }
}

/* Extra small devices */
@media (max-width: 480px) {
  .container { padding: 0 0.75rem; }
  .intro h1 { font-size: 1.75rem; }
  .logo span { display: none; }
  .logo img { width: 32px; height: 32px; }
  .nav { padding: 0.5rem 0.75rem; }
  .btn.primary { font-size: 0.85rem; padding: 0.5rem 0.8rem; }
  .card { padding: 0.75rem; }
  .intro-photo img { width: 160px; height: 160px; }
  .contact-icon { width: 40px; height: 40px; }
  .contact-icon svg { width: 20px; height: 20px; }
}
