/* ==========================================================================
   1. THEME TOKENS (LIGHT & DARK MODE SYNCED WITH RESUME)
   ========================================================================== */
:root[data-theme="light"] {
  --bg-base: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #F1F5F9;
  --bg-glass: rgba(255, 255, 255, 0.82);
  --text-main: #0F172A;
  --text-muted: #475569;
  --text-subtle: #64748B;
  --primary: #0052CC;
  --primary-hover: #0747A6;
  --primary-soft: #EFF6FF;
  --primary-border: #BFDBFE;
  --accent: #00B8D9;
  --ai-text: #065F46;
  --ai-bg: #ECFDF5;
  --ai-border: #6EE7B7;
  --border: #E2E8F0;
  --dot-color: #CBD5E1;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 0 40px rgba(0, 82, 204, 0.12);
  --code-bg: #091E42;
}

:root[data-theme="dark"] {
  --bg-base: #070D19;
  --bg-surface: #0F172A;
  --bg-surface-elevated: #1E293B;
  --bg-glass: rgba(15, 23, 42, 0.82);
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;
  --primary: #3B82F6;
  --primary-hover: #60A5FA;
  --primary-soft: rgba(59, 130, 246, 0.14);
  --primary-border: rgba(59, 130, 246, 0.35);
  --accent: #00B8D9;
  --ai-text: #6EE7B7;
  --ai-bg: rgba(16, 185, 129, 0.14);
  --ai-border: rgba(16, 185, 129, 0.35);
  --border: #1E293B;
  --dot-color: #1E293B;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 14px 36px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 50px rgba(59, 130, 246, 0.18);
  --code-bg: #050911;
}

/* ==========================================================================
   2. GLOBAL RESET & DEVELOPER DOT-MATRIX BACKGROUND
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  position: relative;
}

/* Resume-inspired Dot Matrix Grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(var(--dot-color) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.65;
  z-index: -2;
  pointer-events: none;
}

/* Ambient Glow Orbs */
.ambient-glow {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.15;
  z-index: -1;
  pointer-events: none;
}

.glow-1 {
  top: -120px;
  left: -120px;
  background: var(--primary);
}

.glow-2 {
  bottom: -150px;
  right: -120px;
  background: var(--accent);
}

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

section {
  padding: 88px 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* Color Utility Classes */
.icon-primary { color: var(--primary); }
.icon-accent { color: var(--accent); }
.icon-ai { color: #10B981; }
.fallback-icon { font-size: 3.5rem; }

/* ==========================================================================
   3. STICKY GLASSMORPHISM NAVBAR
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.5px;
}

.brand-badge {
  font-family: 'JetBrains Mono', monospace;
  background: linear-gradient(135deg, #0052CC, #00B8D9);
  color: #FFFFFF;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #0052CC 0%, #0747A6 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 82, 204, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 82, 204, 0.5);
}

.btn-outline {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border);
}

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

.btn-block {
  justify-content: center;
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ==========================================================================
   4. HERO SECTION & INTERACTIVE JAVA 17 TERMINAL
   ========================================================================== */
.hero {
  padding-top: 140px;
  padding-bottom: 80px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ai-bg);
  color: var(--ai-text);
  border: 1px solid var(--ai-border);
  margin-bottom: 20px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.1;
  margin-bottom: 14px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 18px;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 600px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 32px;
}

.social-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.social-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* Terminal Code Card */
.terminal-card {
  background: var(--code-bg);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
}

.terminal-header {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.window-dots {
  display: flex;
  gap: 7px;
}

.window-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot-red { background: #FF5F56; }
.dot-yellow { background: #FFBD2E; }
.dot-green { background: #27C93F; }

.terminal-title {
  font-size: 0.76rem;
  color: #94A3B8;
}

.terminal-status {
  font-size: 0.72rem;
  color: #79F2C0;
}

.terminal-body {
  padding: 20px;
  font-size: 0.82rem;
  line-height: 1.65;
  color: #E2E8F0;
  overflow-x: auto;
}

.kw { color: #FF7B72; font-weight: 600; }
.cls { color: #79C0FF; }
.str { color: #A5D6FF; }
.fn { color: #D2A8FF; }
.cmt { color: #6E7681; font-style: italic; }
.num { color: #79F2C0; }

/* Quick Metrics Bar */
.metrics-bar {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease;
}

.metric-card:hover {
  transform: translateY(-4px);
}

.metric-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.metric-label {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

/* ==========================================================================
   5. SECTION HEADERS
   ========================================================================== */
.section-header {
  margin-bottom: 44px;
}

.section-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.section-tag span.cmd {
  color: var(--accent);
  font-weight: 800;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.6px;
}

/* ==========================================================================
   6. ENGINEERING SUMMARY & KEY IMPACT BENTO GRID
   ========================================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
}

.surface-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.summary-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.summary-list li {
  position: relative;
  padding-left: 22px;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.summary-list li strong {
  color: var(--text-main);
  font-weight: 600;
}

.summary-list li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
  font-size: 1.1rem;
}

.impact-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.impact-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.impact-card.impact-ai {
  border-left-color: #10B981;
}

.impact-card:hover {
  transform: translateX(4px);
}

.impact-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* ==========================================================================
   7. PROFESSIONAL EXPERIENCE TIMELINE
   ========================================================================== */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.exp-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
}

.exp-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.company-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-box {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.logo-box.logo-tide {
  background: #0052FF;
  border-color: #0052FF;
}

.logo-box.logo-atlassian {
  background: #0052CC;
  border-color: #0052CC;
}

.logo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.role-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-main);
}

.company-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 2px;
}

.date-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 5px 12px;
  border-radius: 6px;
  font-weight: 600;
}

.exp-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.exp-bullets li {
  position: relative;
  padding-left: 18px;
  font-size: 0.94rem;
  color: var(--text-muted);
}

.exp-bullets li strong {
  color: var(--text-main);
  font-weight: 600;
}

.exp-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* ==========================================================================
   8. PROJECTS SECTION GRID
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.project-category {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.project-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   9. TECHNICAL SKILLS MATRIX
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.skill-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.skill-box h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.skill-box h3 i {
  color: var(--primary);
  font-size: 1.15rem;
}

.skill-box h3 i.icon-ai {
  color: #10B981;
}

.pill-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pill:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.pill.primary {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--primary);
  font-weight: 600;
}

.pill.ai-pill {
  background: var(--ai-bg);
  border-color: var(--ai-border);
  color: var(--ai-text);
  font-weight: 600;
}

/* ==========================================================================
   10. CERTIFICATIONS, AWARDS & EDUCATION
   ========================================================================== */
.cred-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.cred-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease;
}

.cred-card:hover {
  transform: translateY(-5px);
}

.cred-img-wrap {
  height: 170px;
  background: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.cred-img-wrap img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.cred-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cred-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.cred-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.cred-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Interests Row */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.interest-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.interest-item:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.interest-item i {
  font-size: 1.4rem;
  color: var(--primary);
}

/* ==========================================================================
   11. CONTACT SECTION & FOOTER
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 32px;
}

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

.contact-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.contact-box h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.contact-box p,
.contact-box a {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.contact-box a:hover {
  color: var(--primary);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-base);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-brand {
  color: var(--primary);
  font-weight: 600;
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   12. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid,
  .bento-grid,
  .skills-grid,
  .cred-grid,
  .projects-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .metrics-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .interests-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
  }

  .nav-links.open {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .interests-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}