/* =========================================
   1. CSS VARIABLES & RESET
   ========================================= */
:root {
  --bg-dark: #050505;       /* Deep Black */
  --bg-card: #111111;       /* Dark Card */
  --primary: #00f2ff;       /* Electric Cyan */
  --primary-dim: rgba(0, 242, 255, 0.1);
  --text-main: #ffffff;
  --text-secondary: #a0a0a0;
  
  --font-main: 'Inter', sans-serif;
  --transition: all 0.3s ease;
  
  /* Mid-level curvy texture variable */
  --curve: 16px; 
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* CRITICAL: Offset scroll position so titles aren't hidden behind the fixed navbar */
  scroll-padding-top: 100px; 
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* =========================================
   2. BACKGROUND EFFECTS
   ========================================= */
.bg-grid {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -2;
  background-size: 40px 40px;
  background-image: linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  pointer-events: none;
}

.line-container {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* =========================================
   3. NAVBAR
   ========================================= */
.navbar {
  position: fixed; top: 0; width: 100%;
  padding: 20px 50px;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 1000;
  background: rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo {
  font-size: 1.5rem; 
  font-weight: 800; 
  color: var(--text-main);
  display: flex; 
  align-items: center;
}

.logo-img {
  height: 30px; 
  width: auto; 
  margin-right: 12px;
  border-radius: 4px;
}

.dot { color: var(--primary); }

.nav-links { display: flex; list-style: none; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--text-secondary); font-size: 0.95rem; transition: var(--transition); }
.nav-links a:hover { color: var(--primary); }

.btn-nav {
  color: var(--primary) !important;
  border: 1px solid var(--primary);
  padding: 8px 18px; 
  border-radius: var(--curve); /* Curvy Button */
}
.btn-nav:hover { background: var(--primary); color: var(--bg-dark) !important; }

/* =========================================
   4. HERO SECTION
   ========================================= */
#hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding-top: 60px;
}

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.hero-content { display: flex; align-items: center; justify-content: space-between; }
.hero-text-wrapper { flex: 1; }

.hero-text-wrapper h1 {
  font-size: 4rem; line-height: 1.1; font-weight: 800; margin-bottom: 15px;
}
.role { font-size: 1.2rem; color: var(--primary); margin-bottom: 30px; }

.contact a {
  color: var(--text-secondary); margin-right: 20px; text-decoration: none;
  font-size: 0.95rem; transition: var(--transition);
}
.contact a:hover { color: var(--primary); }

.resume-buttons { margin-top: 30px; display: flex; gap: 15px; }

/* Button Styles - Using --curve */
.btn {
  background: var(--primary); color: var(--bg-dark);
  padding: 12px 28px; 
  border-radius: var(--curve); 
  text-decoration: none; font-weight: 700;
  border: 1px solid var(--primary); transition: var(--transition);
}
.btn:hover { box-shadow: 0 0 20px var(--primary-dim); transform: translateY(-2px); }

.btn-outline {
  background: transparent; color: var(--primary);
  padding: 12px 28px; 
  border-radius: var(--curve); 
  text-decoration: none; font-weight: 700;
  border: 1px solid var(--primary); transition: var(--transition);
}
.btn-outline:hover { background: var(--primary-dim); box-shadow: 0 0 20px var(--primary-dim); }

/* --- CURVY & FRAMED IMAGE STYLES --- */
.hero-image-wrapper { flex: 1; display: flex; justify-content: flex-end; }

.img-frame {
  width: 340px; height: 340px;
  position: relative; z-index: 1;
  /* The Image sits inside this padding, creating the "box lines" effect */
  padding: 15px; 
  border: 2px solid var(--primary);
  border-radius: var(--curve); 
  transition: var(--transition);
}

.profile-img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* Inner radius slightly smaller to look nested */
  border-radius: calc(var(--curve) - 4px); 
  position: relative; z-index: 2;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  background-color: #222;
}

.img-frame:hover {
  box-shadow: 0 0 30px var(--primary-dim);
  transform: scale(1.02);
}

/* =========================================
   5. SECTIONS & NODES
   ========================================= */
main { max-width: 900px; margin: 0 auto; position: relative; padding-bottom: 100px; }

.section-node {
  position: relative; padding-left: 60px; margin-bottom: 100px;
  opacity: 0;
}

.node-dot {
  position: absolute; left: 24px; top: 8px;
  width: 12px; height: 12px;
  background: var(--bg-dark);
  border: 2px solid var(--primary);
  border-radius: 50%;
  z-index: 10;
  box-shadow: 0 0 10px var(--primary);
}

.section-node h2 {
  font-size: 2rem; margin-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 10px; display: inline-block;
}

.section-node p { color: var(--text-secondary); font-size: 1rem; max-width: 700px; }

/* =========================================
   6. CARDS & GRID
   ========================================= */
.skill-grid { display: flex; flex-wrap: wrap; gap: 12px; }

.skill-box {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-main);
  padding: 10px 24px; 
  border-radius: var(--curve); 
  cursor: default; transition: var(--transition);
  opacity: 0;
}
.skill-box:hover {
  border-color: var(--primary); color: var(--primary);
  box-shadow: 0 0 15px var(--primary-dim);
}

.project-card, .cert-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 25px; 
  border-radius: var(--curve); 
  margin-bottom: 25px;
  transition: var(--transition);
  opacity: 0;
}
.project-card:hover, .cert-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0,242,255,0.3);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.card-header h3, .cert-card h3 { color: var(--text-main); font-size: 1.25rem; }
.tag { 
    color: var(--primary); font-size: 0.8rem; 
    border: 1px solid var(--primary-dim); padding: 2px 8px; 
    border-radius: 6px; 
}

.card-actions { margin-top: 15px; }
.btn-sm {
  font-size: 0.8rem; color: var(--primary); border: 1px solid rgba(0,242,255,0.3);
  padding: 6px 14px; 
  border-radius: var(--curve); 
  text-decoration: none; transition: var(--transition);
  display: inline-block;
}
.btn-sm:hover { background: var(--primary); color: var(--bg-dark); }

.cert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.cert-card { display: flex; flex-direction: column; justify-content: space-between; }

/* =========================================
   7. FORM & FOOTER
   ========================================= */
.input-group { margin-bottom: 15px; }
input, textarea {
  width: 100%; background: #0a0a0a; border: 1px solid #333; color: #fff;
  padding: 12px; 
  border-radius: var(--curve);
  font-family: var(--font-main);
}
input:focus, textarea:focus { outline: none; border-color: var(--primary); }
.full-width { width: 100%; }

footer { text-align: center; padding: 40px; color: #555; border-top: 1px solid rgba(255,255,255,0.05); margin-top: 50px; }

/* Mobile */
@media (max-width: 768px) {
  .hero-content { flex-direction: column-reverse; text-align: center; }
  .img-frame { width: 260px; height: 260px; margin-bottom: 40px; margin-left: auto; margin-right: auto; }
  .nav-links { display: none; }
  .section-node { padding-left: 40px; }
}
