/* Base */
:root {
  --bg: #0b0d10;
  --panel: #0f1318;
  --text: #e6edf3;
  --muted: #9aa4b2;
  --primary: #22c55e;
  --primary-700: #16a34a;
  --accent: #60a5fa;
  --secondary: #0b1116;
  --chip: #0f172a;
  --border: #1a232c;
  --glow: 0 0 0 1px rgba(34,197,94,0.15), 0 10px 30px rgba(34,197,94,0.15);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Light theme - Now Default */
:root.light {
  --bg: #f7fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --primary: #16a34a;
  --primary-700: #15803d;
  --accent: #2563eb;
  --secondary: #f1f5f9;
  --chip: #f1f5f9;
  --border: #e2e8f0;
  --glow: 0 0 0 1px rgba(37,99,235,0.15), 0 10px 30px rgba(37,99,235,0.15);
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
}

/* Set light theme as default */
:root {
  --bg: #f7fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --primary: #16a34a;
  --primary-700: #15803d;
  --accent: #2563eb;
  --secondary: #f1f5f9;
  --chip: #f1f5f9;
  --border: #e2e8f0;
  --glow: 0 0 0 1px rgba(37,99,235,0.15), 0 10px 30px rgba(37,99,235,0.15);
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
}

/* Dark theme */
:root.dark {
  --bg: #0b0d10;
  --panel: #0f1318;
  --text: #e6edf3;
  --muted: #9aa4b2;
  --primary: #22c55e;
  --primary-700: #16a34a;
  --accent: #60a5fa;
  --secondary: #0b1116;
  --chip: #0f172a;
  --border: #1a232c;
  --glow: 0 0 0 1px rgba(34,197,94,0.15), 0 10px 30px rgba(34,197,94,0.15);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 80% -10%, rgba(34,197,94,0.12), transparent 60%),
              radial-gradient(1000px 700px at -10% 20%, rgba(59,130,246,0.08), transparent 60%),
              var(--bg);
  padding-top: 64px;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(11,13,16,0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

/* Light theme header contrast */
:root.light .site-header {
  background: rgba(255,255,255,0.85);
  border-bottom-color: #e2e8f0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: 1px; font-size: 20px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; margin-left: 6px; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,0.7); animation: pulse 1.8s infinite; vertical-align: middle; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.7); }
  70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.nav { display: flex; gap: 20px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; padding: 8px 10px; border-radius: 8px; }
.nav a:hover { color: var(--text); background: rgba(96,165,250,0.08); }
.nav a.active { color: var(--text); background: rgba(34,197,94,0.12); }
.cta-link { background: linear-gradient(90deg, var(--primary), var(--accent)); color: #0b0d10 !important; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--primary-700); font-weight: 800; }
.cta-link:hover { box-shadow: var(--glow); transform: translateY(-1px); }

/* Ensure "Let's talk" looks like other titles when selected (dark theme) */
.nav a.cta-link.active { background: rgba(34,197,94,0.12); color: var(--text) !important; border-color: var(--border); box-shadow: none; }

/* Light theme button contrast */
:root.light .btn.primary { background: linear-gradient(90deg, #15803d, #1d4ed8); color: #ffffff; border-color: #cbd5e1; }
:root.light .btn.secondary { background: #ffffff; color: #0f172a; border-color: #cbd5e1; }
:root.light .cta-link { background: linear-gradient(90deg, #15803d, #1d4ed8); color: #ffffff !important; border-color: #cbd5e1; }
.nav-toggle { display: none; background: transparent; border: 0; color: var(--text); font-size: 22px; }

/* Hero */
.hero { padding: 72px 0 32px; }
.hero-inner { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 32px; align-items: center; }
.hero-text h1 { margin: 0 0 6px; font-size: 44px; letter-spacing: .2px; }
.subtitle { margin: 0 0 16px; color: var(--muted); }
.cta-group { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-photo img { width: 220px; height: 220px; object-fit: cover; border-radius: 24px; border: 1px solid var(--border); box-shadow: var(--glow); }

/* Sections */
.section { padding: 56px 0; }
.section h2 { margin: 0 0 14px; font-size: 30px; letter-spacing: .2px; position: relative; padding-left: 12px; }
.section h2:before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 4px; border-radius: 4px; background: linear-gradient(180deg, var(--primary), var(--accent)); }
.section-lead { color: var(--muted); margin-top: -8px; }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.skill-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.skill-card h3 { margin: 0 0 6px; }
.skill-card ul { margin: 0; padding-left: 18px; color: var(--muted); }

/* Resume */
.resume-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: linear-gradient(180deg, rgba(34,197,94,0.08), transparent 60%), var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.resume-meta h3 { margin: 0 0 4px; }
.resume-meta .muted { color: var(--muted); }
.resume-actions { display: flex; gap: 10px; }

/* Projects */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.filter-btn { background: var(--secondary); color: var(--text); border: 1px solid var(--border); padding: 8px 12px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.2s ease; }
.filter-btn.active, .filter-btn:hover { background: var(--primary); border-color: var(--primary-700); color: #0a0a0a; }
.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.project-card { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transform: translateY(0); transition: transform .2s ease, box-shadow .2s ease; }
.project-card:hover { transform: translateY(-4px); box-shadow: var(--glow); }
.project-image { position: relative; background: radial-gradient(600px 300px at 80% -20%, rgba(96,165,250,0.18), transparent 60%), #0a0f14; aspect-ratio: 4 / 3; height: 200px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-bottom: 1px solid var(--border); }
.project-image img { width: 100%; height: 100%; object-fit: cover; opacity: 0.95; border-radius: 8px; }
.project-image img { transition: transform .3s ease, opacity .3s ease; }
.project-card:hover .project-image img { transform: scale(1.05); opacity: 1; }
.project-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.3), rgba(0,0,0,0)); opacity: 0; transition: opacity .2s ease; pointer-events: none; }
.project-card:hover .project-overlay { opacity: 1; }
.project-content { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.project-content h3 { margin: 0; font-size: 18px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }
.tools { margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: var(--chip); border: 1px solid var(--border); color: var(--muted); padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.project-actions { margin-top: auto; padding-top: 8px; }
.project-actions .btn { min-height: 36px; width: 100%; justify-content: center; }
.project-card a.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 700; border-radius: 12px; padding: 10px 14px; border: 1px solid var(--border); letter-spacing: .2px; }
.btn.primary { background: linear-gradient(90deg, var(--primary), var(--accent)); color: #0a0a0a; border-color: var(--primary-700); }
.btn.secondary { background: var(--panel); color: var(--text); }
.btn.tertiary { background: transparent; color: var(--text); }
.btn:hover { transform: translateY(-1.5px); box-shadow: var(--glow); transition: transform .15s ease, box-shadow .2s ease; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.contact-social { display: flex; gap: 12px; margin-bottom: 12px; }
.icon-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--text); text-decoration: none; }
.icon-btn:hover { box-shadow: var(--glow); transform: translateY(-1px); }
.contact-form { background: transparent; border: 0; border-radius: 12px; padding: 0; box-shadow: none; }
.calendar-embed { background: #ffffff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.calendar-embed iframe { border: 0; width: 100%; height: 600px; display: block; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
label { color: var(--muted); font-size: 14px; }
input, textarea { background: #0a0f14; color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(96,165,250,0.25); }
.contact-info { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.contact-link { color: var(--text); text-decoration: none; }
.contact-link:hover { color: var(--primary); }

/* Light theme contrast for Let's talk */
:root.light input, :root.light textarea { background: #ffffff; color: #0f172a; border-color: #cbd5e1; }
:root.light input::placeholder, :root.light textarea::placeholder { color: #64748b; }
:root.light label { color: #475569; }
:root.light .contact-link { color: #0f172a; }
.contact-info { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.contact-link { color: var(--text); text-decoration: none; }
.contact-link:hover { color: var(--primary); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 20px 0 28px; margin-top: 24px; }
.resources-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.resource-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.service-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px; box-shadow: var(--shadow); }
.muted { color: var(--muted); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; }
.footer-links { display: flex; gap: 14px; }

/* Testimonials */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.testimonial-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.testimonial-quote { font-size: 16px; line-height: 1.6; color: var(--text); }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(34,197,94,0.2), rgba(96,165,250,0.2)); color: var(--text); font-weight: 800; border: 1px solid var(--border); object-fit: cover; }
.name { font-weight: 700; }
.role { font-size: 14px; }

/* Responsive */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }
  .hero-inner { gap: 28px; }
  .projects-grid { gap: 18px; }
  .calendar-embed iframe { height: 550px; }
}

@media (max-width: 900px) {
  .container { padding: 0 20px; }
  .hero { padding: 80px 0 40px; }
  .hero-inner { 
    grid-template-columns: 1fr; 
    text-align: center; 
    gap: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero-text { order: 2; }
  .hero-photo { order: 1; }
  .hero-text h1 { font-size: 40px; margin-bottom: 16px; }
  .subtitle { font-size: 20px; margin-bottom: 24px; }
  .hero-photo img { width: 200px; height: 200px; margin: 0 auto; }
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .project-image { height: 200px; }
  .project-image img { width: 100%; height: 100%; object-fit: cover; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .calendar-embed iframe { height: 500px; }
  .resources-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
  .services-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
  .testimonials-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
  .section { padding: 50px 0; }
  .section h2 { font-size: 32px; margin-bottom: 12px; }
  .section-lead { font-size: 18px; margin-bottom: 40px; }
  .cta-group { gap: 16px; }
  .btn { padding: 12px 20px; font-size: 15px; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  
  /* Mobile Navigation */
  .nav { 
    display: none; 
    position: fixed; 
    top: 64px; 
    left: 0; 
    right: 0; 
    background: var(--panel); 
    border: 1px solid var(--border); 
    border-radius: 0 0 16px 16px; 
    padding: 20px; 
    flex-direction: column; 
    gap: 12px; 
    box-shadow: var(--shadow-lg); 
    z-index: 1000;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  .nav.show { 
    display: flex; 
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .nav a {
    padding: 12px 16px;
    text-align: center;
    border-radius: 8px;
    font-size: 16px;
  }
  .nav-toggle { display: inline-block; }
  
  /* Mobile Hero */
  .hero { padding: 80px 0 40px; }
  .hero-inner { 
    gap: 24px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .hero-text { order: 2; }
  .hero-photo { order: 1; }
  .hero-text h1 { font-size: 32px; line-height: 1.2; margin-bottom: 16px; }
  .subtitle { font-size: 18px; margin-bottom: 24px; }
  .hero-photo img { width: 180px; height: 180px; }
  
  /* Mobile Sections */
  .section { padding: 40px 0; }
  .section h2 { font-size: 28px; margin-bottom: 12px; }
  .section-lead { font-size: 16px; margin-bottom: 32px; }
  
  /* Mobile Grids */
  .projects-grid { grid-template-columns: 1fr; gap: 20px; }
  .project-image { height: 180px; }
  .project-image img { width: 100%; height: 100%; object-fit: cover; }
  .project-content { padding: 16px; }
  .project-content h3 { font-size: 18px; line-height: 1.3; }
  
  .resources-grid { grid-template-columns: 1fr; gap: 16px; }
  .services-grid { grid-template-columns: 1fr; gap: 16px; }
  .testimonials-grid { grid-template-columns: 1fr; gap: 16px; }
  .skills-grid { grid-template-columns: 1fr; gap: 16px; }
  
  /* Mobile Filters */
  .filters { gap: 8px; margin-bottom: 20px; }
  .filter-btn { padding: 8px 12px; font-size: 13px; }
  
  /* Mobile Buttons */
  .cta-group { flex-direction: column; gap: 12px; align-items: center; }
  .btn { padding: 14px 20px; font-size: 15px; min-width: 200px; }
  
  /* Mobile Contact */
  .calendar-embed iframe { height: 450px; }
  .contact-social { justify-content: center; margin-bottom: 20px; gap: 16px; }
  .icon-btn { width: 48px; height: 48px; }
  
  /* Mobile Booking Note */
  .booking-note { 
    margin-top: 16px !important; 
    padding: 16px !important; 
    font-size: 14px !important; 
    line-height: 1.5 !important;
  }
  .booking-note p { padding-left: 0 !important; margin-bottom: 8px !important; }
  
  /* Mobile Testimonials */
  .testimonial-quote { font-size: 15px; line-height: 1.5; }
  .avatar { width: 44px; height: 44px; }
  .testimonial-author { gap: 12px; }
  
  /* Mobile Cards */
  .service-card, .skill-card, .testimonial-card, .resource-card {
    padding: 20px;
  }
  
  /* Mobile Footer */
  .footer-inner { 
    flex-direction: column; 
    gap: 16px; 
    text-align: center; 
  }
  .footer-links { justify-content: center; }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .hero { padding: 70px 0 30px; }
  .hero-text h1 { font-size: 28px; }
  .subtitle { font-size: 16px; }
  .hero-photo img { width: 160px; height: 160px; }
  .hero-inner { gap: 20px; }
  .section { padding: 30px 0; }
  .section h2 { font-size: 24px; }
  .section-lead { font-size: 14px; }
  .btn { padding: 12px 16px; font-size: 14px; min-width: 180px; }
  .project-content h3 { font-size: 16px; }
  .testimonial-quote { font-size: 14px; }
  .booking-note { padding: 12px !important; font-size: 13px !important; }
  .calendar-embed iframe { height: 400px; }
}