/* =========================================
   1. THEME CONFIGURATION (GENERIC VARIABLES)
   Change these colors to update the whole site
   ========================================= */
:root {
  /* Backgrounds */
  --bg-main: #0F0F0F;      /* Deep Black/Grey */
  --bg-secondary: #1A1A1A; /* Slightly lighter for cards */
  
  /* Text */
  --text-primary: #F0F0F0; 
  --text-muted: #888888;   
  
  /* Borders */
  --border-color: #333333; 
  
  /* THEME ACCENT COLOR (Change this!) */
  --accent: #FF9F1C; /* Currently: Electric Amber */
  
  /* Font Stack */
  --font-main: 'JetBrains Mono', monospace;
}

/* =========================================
   2. GLOBAL RESET & BASE STYLES
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-main);
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  /* Subtle Tech Grid Pattern */
  background-image: linear-gradient(var(--border-color) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 50px 50px;
  color: var(--text-primary);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* =========================================
   3. HERO SECTION (Header)
   ========================================= */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-bottom: 4px solid var(--accent);
  overflow: hidden;
  text-align: center;
  padding: 20px;
}

.hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: -1;
  background: radial-gradient(circle at center, #2a2a2a 0%, #000 100%);
}

.hero-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 15, 15, 0.85);
  z-index: -1;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 15px;
  text-shadow: 0 5px 15px rgba(0,0,0,0.8);
  letter-spacing: -2px;
  color: #fff;
}

.hero-tagline {
  background: var(--accent);
  color: var(--bg-main);
  padding: 8px 16px;
  font-weight: 800;
  font-size: 1.1rem;
  display: inline-block;
  margin-bottom: 40px;
  transform: skewX(-10deg);
  box-shadow: 0 0 20px rgba(255, 159, 28, 0.4);
}

.hero-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.scroll-down {
  position: absolute;
  bottom: 30px;
  color: var(--text-muted);
  font-size: 2rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
  40% {transform: translateY(-10px);}
  60% {transform: translateY(-5px);}
}

/* =========================================
   4. NAVIGATION
   ========================================= */
nav {
  position: sticky;
  top: 0;
  background: rgba(15, 15, 15, 0.95);
  border-bottom: 1px solid var(--border-color);
  padding: 15px;
  display: flex;
  justify-content: center;
  gap: 15px;
  z-index: 1000;
  backdrop-filter: blur(10px);
  flex-wrap: wrap;
}

nav a {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 8px 16px;
  border: 1px solid transparent;
  transition: all 0.3s;
}

nav a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255, 159, 28, 0.05);
}

/* =========================================
   5. LAYOUT UTILITIES
   ========================================= */
section {
  max-width: 1100px;
  margin: 100px auto;
  padding: 0 20px;
  scroll-margin-top: 100px;
}

h2 {
  font-size: 2.2rem;
  text-transform: uppercase;
  margin-bottom: 40px;
  border-left: 6px solid var(--accent);
  padding-left: 20px;
  color: #fff;
}

.grid-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

/* =========================================
   6. UI COMPONENTS (Buttons, Cards, Badges)
   ========================================= */

/* Buttons */
.btn {
  padding: 15px 35px;
  font-weight: 700;
  text-transform: uppercase;
  border: 2px solid var(--accent);
  transition: all 0.2s;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  display: inline-block;
}

.btn-solid {
  background: var(--accent);
  color: var(--bg-main);
}

.btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(255, 159, 28, 0.25);
}

/* Standard Card */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 30px;
  margin-bottom: 25px;
  transition: all 0.3s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

/* Skill Tags */
.skill-tags-container {
  display: flex; 
  flex-wrap: wrap; 
  gap: 10px;
}

.skill-subhead {
  font-size: 0.9rem;
  color: var(--accent);
  text-transform: uppercase;
  margin-top: 15px;
  margin-bottom: 8px;
  font-weight: bold;
  display: block;
  width: 100%;
}

.skill-box {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #444;
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 2px;
  cursor: default;
  transition: border-color 0.2s;
}

.skill-box.filled {
  background: var(--accent);
  color: var(--bg-main);
  border-color: var(--accent);
  font-weight: 800;
}

.skill-box:hover { border-color: var(--accent); }

/* =========================================
   7. COMPLEX COMPONENTS (Systems & Projects)
   ========================================= */
.mech-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  height: 100%;
  position: relative;
}

.mech-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 25px rgba(255, 159, 28, 0.1);
  transform: translateY(-5px);
}

.mech-media {
  height: 200px;
  background: #000;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Image behavior inside cards */
.mech-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  opacity: 0.9;
}

.mech-card:hover .mech-media img {
  transform: scale(1.1);
  opacity: 1;
}

/* Placeholder Icon Style */
.gif-placeholder { font-size: 3rem; color: #333; z-index: 1; }

/* --- PLAY BUTTON OVERLAY (ALWAYS VISIBLE) --- */
.play-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  
  /* Slight dark tint to ensure icon is readable */
  background: rgba(0, 0, 0, 0.2);
  
  display: flex;
  justify-content: center;
  align-items: center;
  
  /* Visible by default */
  opacity: 1; 
  transition: background 0.3s;
  z-index: 10;
}

/* Darken overlay on hover */
.mech-card:hover .play-overlay {
  background: rgba(0, 0, 0, 0.4);
}

.play-icon {
  font-size: 2.5rem;
  color: #fff;
  text-shadow: 0 0 20px var(--accent);
  
  /* Semi-transparent circle background */
  background: rgba(0, 0, 0, 0.6);
  
  border-radius: 50%;
  width: 70px; height: 70px;
  display: flex; 
  justify-content: center; 
  align-items: center;
  border: 2px solid rgba(255, 255, 255, 0.8);
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

/* On hover, icon scales and lights up */
.mech-card:hover .play-icon {
  transform: scale(1.15);
  background: var(--accent); 
  border-color: #fff;
}

/* --- Content Styles --- */
.mech-content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mech-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.mech-header h3 { font-size: 1.1rem; color: #fff; margin: 0; }

.mech-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--bg-main);
  background: var(--accent);
  padding: 4px 8px;
}

.mech-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #333;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.tech-tag {
  font-size: 0.75rem;
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  padding: 4px 8px;
  border: 1px solid #333;
}

/* =========================================
   8. TIMELINE (Experience)
   ========================================= */
.timeline { 
  border-left: 2px solid var(--border-color); 
  padding-left: 30px; 
  margin-left: 10px; 
}

.exp-item { position: relative; margin-bottom: 40px; }

.exp-item::before {
  content: ''; position: absolute; left: -37px; top: 5px;
  width: 12px; height: 12px; background: var(--bg-main);
  border: 2px solid var(--accent);
}

.exp-date { 
  background: #333; color: #fff; padding: 2px 8px; 
  font-size: 0.8rem; margin-bottom: 8px; display: inline-block; 
}

/* =========================================
   9. VIDEO MODAL (POPUP)
   ========================================= */
.modal-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  background: #000;
  border: 1px solid var(--accent);
  box-shadow: 0 0 50px rgba(255, 159, 28, 0.2);
}

/* 16:9 Aspect Ratio Container */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; 
  height: 0;
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

.close-btn {
  position: absolute;
  top: -40px; right: 0;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.close-btn:hover { color: var(--accent); }

/* =========================================
   10. FOOTER & RESPONSIVE
   ========================================= */
footer {
  background: var(--bg-secondary);
  border-top: 2px solid var(--accent);
  padding: 50px;
  text-align: center;
  margin-top: 100px;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  nav { gap: 10px; }
  nav a { padding: 5px 10px; font-size: 0.75rem; }
  
  .modal-content { width: 95%; }
}