﻿/* ==========================================================================
   CSS Variables & Themes
   ========================================================================== */
:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: rgba(22, 27, 34, 0.8);
  --bg-card-hover: rgba(33, 38, 45, 0.95);
  --border-color: rgba(240, 246, 252, 0.1);
  --border-glow: rgba(255, 129, 63, 0.25);
  
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  
  --accent-bmc: #FF813F;
  --accent-bmc-yellow: #FFDD00;
  --accent-primary: #38bdf8;
  --accent-purple: #a855f7;
  --accent-green: #22c55e;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 12px 30px -4px rgba(0, 0, 0, 0.4);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: #ffffff;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(255, 129, 63, 0.3);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 30px -4px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.nav-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-code {
  color: var(--accent-primary);
}

.logo-accent {
  color: var(--accent-bmc);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.95rem;
  font-weight: 500;
}

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

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

.nav-links .nav-highlight {
  color: var(--accent-bmc);
  font-weight: 600;
}

.theme-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-btn:hover {
  border-color: var(--accent-bmc);
  transform: rotate(15deg);
}

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* ==========================================================================
   Layout & Container
   ========================================================================== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  flex: 1;
}

.section {
  margin-bottom: 5rem;
}

.section-header {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: inline-block;
}

.section-line {
  height: 3px;
  width: 45px;
  background: var(--accent-bmc);
  border-radius: var(--radius-full);
  margin-top: 0.4rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  text-align: center;
  padding: 3rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
}

.avatar-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.avatar-ring {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--accent-bmc), var(--accent-primary));
  box-shadow: 0 10px 25px rgba(255, 129, 63, 0.2);
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--bg-secondary);
}

.coffee-float-badge {
  position: absolute;
  bottom: -4px;
  right: -10px;
  background: var(--accent-bmc);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  border: 2px solid var(--bg-primary);
  white-space: nowrap;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 0.35rem;
}

.hero-role {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

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

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

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

.btn-bmc {
  background: linear-gradient(135deg, var(--accent-bmc), #ff9800);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(255, 129, 63, 0.35);
}

.btn-bmc:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 129, 63, 0.5);
  color: #ffffff;
}

.btn-bmc-large {
  background: linear-gradient(135deg, var(--accent-bmc), #ff9800);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 20px rgba(255, 129, 63, 0.4);
  width: 100%;
  max-width: 420px;
  justify-content: center;
  margin-top: 1rem;
}

.btn-bmc-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 129, 63, 0.6);
  color: #fff;
}

.social-links {
  display: flex;
  gap: 1.25rem;
}

.social-links a {
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
}

.social-links a:hover {
  color: var(--accent-bmc);
  transform: translateY(-3px);
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2.2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.about-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.stat-box {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-bmc);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   Timeline / Work History
   ========================================================================== */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border-color);
  margin-left: 0.75rem;
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -1.95rem;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-bmc);
  box-shadow: 0 0 10px var(--accent-bmc);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition);
}

.timeline-content:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.timeline-role {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-company {
  font-size: 0.95rem;
  color: var(--accent-primary);
  font-weight: 600;
  display: block;
  margin-top: 0.2rem;
}

.timeline-date {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.timeline-bullets {
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-bullets li strong {
  color: var(--text-primary);
}

/* ==========================================================================
   Projects / Architectural Highlights
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-lg);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.project-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-bmc);
}

.status-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.status-tag.active {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-green);
}

.project-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

/* ==========================================================================
   Skills Section
   ========================================================================== */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.skill-category h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.badges-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.skill-badge svg {
  width: 14px;
  height: 14px;
  color: var(--accent-bmc);
}

/* ==========================================================================
   Support & Buy Me A Coffee Section
   ========================================================================== */
.support-section {
  margin-top: 2rem;
}

.support-card {
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(255, 129, 63, 0.05) 100%);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.support-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-bmc);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  margin-bottom: 1rem;
}

.heart-icon {
  width: 18px;
  height: 18px;
  fill: var(--accent-bmc);
}

.support-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.75rem;
}

.support-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin-bottom: 2rem;
}

.coffee-calculator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  max-width: 500px;
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.calc-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.coffee-options {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.coffee-btn {
  flex: 1 1 calc(33% - 0.75rem);
  min-width: 120px;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.coffee-btn:hover {
  border-color: var(--accent-bmc);
}

.coffee-btn.active {
  background: rgba(255, 129, 63, 0.15);
  border-color: var(--accent-bmc);
  color: var(--accent-bmc);
}

.custom-input-row {
  display: flex;
  align-items: center;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.8rem;
  width: 100%;
  max-width: 250px;
}

.custom-input-row .prefix {
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 0.4rem;
}

.custom-input-row input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  width: 100%;
  outline: none;
  font-family: var(--font-main);
}

.safe-checkout-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.safe-checkout-note svg {
  width: 14px;
  height: 14px;
  color: var(--accent-green);
}

.goal-tracker {
  margin-top: 2rem;
  width: 100%;
  max-width: 500px;
  text-align: left;
}

.goal-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.progress-bar {
  height: 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-bmc), var(--accent-bmc-yellow));
  border-radius: var(--radius-full);
  transition: width 1s ease-in-out;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin-top: auto;
}

.footer-container {
  max-width: 960px;
  margin: 0 auto;
}

.footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-subtext {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  margin-top: 0.4rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .hero-title {
    font-size: 2.1rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .timeline {
    padding-left: 1rem;
    margin-left: 0.25rem;
  }
  
  .timeline-dot {
    left: -1.35rem;
  }
  
  .support-title {
    font-size: 1.75rem;
  }
  
  .support-card {
    padding: 2rem 1.25rem;
  }
}
