/* Simple, minimal stylesheet for a lightweight site */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}

:root {
  --bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --accent: #0b66ff; /* maps to previous --neon-blue for small inline uses */
  --accent2: #6b5cff; /* maps to previous --neon-purple */
  --header-bg: #f8fafc;
  --header-border: #e6edf3;
  --card-bg: #ffffff;
  --card-border: #e6edf3;
  --subtle-bg: #fbfdff;
  --subtle-border: #eef6ff;
}

/* Dark mode colors */
[data-theme="dark"] {
  --bg: #0f172a;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #ef4444;
  --accent2: #dc2626;
  --header-bg: #1e293b;
  --header-border: #334155;
  --card-bg: #1e293b;
  --card-border: #334155;
  --subtle-bg: #1e293b;
  --subtle-border: #334155;
}
body {
  font-family: 'Merriweather', Georgia, 'Times New Roman', Times, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}
/* Formal heading font */
h1, h2, h3, .section-title, .recent-title {
  font-family: 'Playfair Display', 'Merriweather', serif;
}
header { background: var(--header-bg); border-bottom: 1px solid var(--header-border); transition: background-color 0.3s ease, border-color 0.3s ease; }
nav { max-width: 1000px; margin: 0 auto; padding: 0.75rem 1rem; display: flex; align-items: center; justify-content: space-between; position: relative; }
.logo { font-weight: 700; color: var(--text); text-decoration: none; font-size: 1.1rem; transition: color 0.3s ease; }
.logo:hover { color: var(--accent); }
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; padding: 0.5rem; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: color 0.3s ease; }
.hamburger:hover { color: var(--accent); }
.nav-links { display: flex; gap: 1rem; list-style: none; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.95rem;
  /* start hidden for fade-in */
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 260ms ease, transform 260ms cubic-bezier(.2,.9,.2,1), color 0.3s ease, background-color 0.3s ease;
}
.nav-links a.active, .nav-links a:hover { color: var(--accent); background: var(--subtle-bg); }

/* Show nav links when menu is visible (desktop init or mobile active) */
.nav-links.visible a,
.nav-links.active a {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for nicer effect */
.nav-links a:nth-child(1) { transition-delay: 0ms; }
.nav-links a:nth-child(2) { transition-delay: 60ms; }
.nav-links a:nth-child(3) { transition-delay: 120ms; }
.nav-links a:nth-child(4) { transition-delay: 180ms; }
.nav-links a:nth-child(5) { transition-delay: 240ms; }

/* Mobile menu styles */
@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-links { 
    position: absolute; 
    top: 100%; 
    left: 0; 
    right: 0; 
    background: var(--header-bg); 
    flex-direction: column; 
    gap: 0; 
    list-style: none; 
    max-height: 0; 
    overflow: hidden; 
    transition: max-height 0.3s ease-out, background-color 0.3s ease; 
    border-bottom: 1px solid var(--header-border); 
    z-index: 999; 
  }
  .nav-links.active { max-height: 300px; }
  .nav-links.active a { opacity: 1; transform: translateY(0); }
  .nav-links li { padding: 0; }
  .nav-links a { 
    display: block; 
    padding: 0.75rem 1rem; 
    border-radius: 0; 
    opacity: 1;
    transform: translateY(0);
  }
  .nav-links a.active { color: var(--accent); background: var(--subtle-bg); }
}

main { max-width: 1000px; margin: 2.5rem auto; padding: 0 1rem; }
.hero { text-align: center; padding: 3rem 1rem; }
.hero h1 { font-size: 2rem; margin-bottom: 0.5rem; color: var(--accent); }
.hero .subtitle { color: var(--muted); margin-bottom: 1rem; }
.contact-info { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.contact-info a { color: var(--text); text-decoration: none; font-weight: 500; transition: all 0.3s ease; }
.contact-info a:hover { color: var(--accent); transform: translateY(-2px); }
.scroll-indicator { margin-top: 2rem; font-size: 1.5rem; color: var(--muted); animation: bounce 2s infinite; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } 60% { transform: translateY(-5px); } }

section { margin: 2rem 0; }
.section-title { text-align: left; font-weight: 700; margin-bottom: 2rem; font-size: 1.5rem; color: var(--text); border-bottom: 2px solid var(--accent); padding-bottom: 0.5rem; }

/* Clean experience list styling */
.experience-list { display: flex; flex-direction: column; gap: 2.5rem; }
.experience-item { border-bottom: 1px solid var(--card-border); padding-bottom: 2rem; }
.experience-item:last-child { border-bottom: none; }
.experience-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; gap: 1rem; }
.experience-header h3 { font-size: 1.15rem; font-weight: 700; color: var(--text); margin: 0; line-height: 1.4; }
.experience-header .company { color: var(--accent); font-weight: 600; margin: 0.25rem 0 0 0; font-size: 1rem; }
.experience-header .location { color: var(--muted); font-size: 0.9rem; margin: 0.25rem 0 0 0; }
.experience-header .date { color: var(--muted); font-size: 0.9rem; white-space: nowrap; font-weight: 500; }
.experience-details { list-style: disc; margin: 1rem 0 0 1.25rem; padding: 0; }
.experience-details li { color: var(--text); line-height: 1.7; margin-bottom: 0.5rem; padding-left: 0.25rem; }
.project-description { color: var(--text); line-height: 1.7; margin: 0.75rem 0; }
.project-tech-inline { color: var(--muted); font-size: 0.95rem; margin: 0.5rem 0; }
.project-links { display: flex; gap: 1rem; margin-top: 1rem; }
.project-links a { color: var(--accent); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; transition: border-color 0.3s ease; }
.project-links a:hover { border-bottom-color: var(--accent); }

@media (max-width: 768px) {
  .experience-header { flex-direction: column; }
  .experience-header .date { align-self: flex-start; }
}

.project-card.visible { opacity: 1; transform: translateY(0); }

.projects-grid .project-card { will-change: opacity, transform; }

footer { max-width: 1000px; margin: 2.5rem auto; padding: 0 1rem 2rem; color: var(--muted); font-size: 0.9rem; }

/* Fade-in upwards animations (home page only) */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.home-page .hero {
  animation: fadeInUp 0.8s ease-out;
}

body.home-page .hero h1 {
  animation: fadeInUp 0.8s ease-out;
}

body.home-page .hero .subtitle {
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

body.home-page .contact-info {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

body.home-page .scroll-indicator {
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

body.home-page .recent-roles {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

@media (max-width: 600px) {
  .hero h1 { font-size: 1.5rem; }
}

/* Recent roles component (white horizontal cards) */
.recent-roles { background: var(--card-bg); padding: 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid var(--card-border); transition: background-color 0.3s ease, border-color 0.3s ease; }
.recent-title { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 0.75rem; text-transform: none; }
.roles-list { display: flex; flex-direction: column; gap: 0.75rem; }
.role-card { display: flex; align-items: center; justify-content: space-between; background: var(--card-bg); border: 1px solid var(--card-border); padding: 0.75rem; border-radius: 10px; box-shadow: 0 1px 0 rgba(16,24,40,0.03); transition: all 0.3s ease; cursor: pointer; }
.role-card:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.1); border-color: var(--accent); }
.role-left { display: flex; align-items: center; gap: 0.75rem; }
.role-logo { width: 44px; height: 44px; border-radius: 8px; background: var(--subtle-bg); display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; font-size: 1rem; border: 1px solid var(--subtle-border); object-fit: cover; }
.role-info { display: flex; flex-direction: column; }
.role-company { font-weight: 700; color: var(--accent); text-transform: lowercase; }
.role-position { color: var(--muted); font-size: 0.95rem; }
.role-date { color: var(--muted); font-size: 0.95rem; white-space: nowrap; margin-left: 1rem; }

@media (max-width: 720px) {
  .roles-list { gap: 0.5rem; }
  .role-card { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .role-date { align-self: flex-end; }
}

/* Contact page styles */
.contact-content { text-align: left; max-width: 720px; }
.intro-text { font-size: 1.05rem; color: var(--muted); margin-bottom: 2rem; line-height: 1.7; }
.contact-links { display: flex; gap: 1rem; flex-wrap: wrap; margin: 2rem 0; }
.contact-link { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 1rem; border-bottom: 2px solid transparent; transition: border-color 0.3s ease; padding-bottom: 0.25rem; }
.contact-link:hover { border-bottom-color: var(--accent); }

@media (max-width: 600px) {
  .contact-links { flex-direction: column; gap: 0.75rem; }
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  top: 4.5rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease, border-color 0.3s ease;
  z-index: 1001;
}

.theme-toggle:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke: var(--text);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.3s ease;
}

@media (max-width: 768px) {
  .theme-toggle {
    top: auto;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
  }
  .theme-toggle:active {
    transform: scale(0.95);
  }
  .theme-toggle svg {
    width: 22px;
    height: 22px;
  }
}
