/* ====================================================
   Variables & globals
   ==================================================== */
:root {
  --primary: #1e7a4b;
  --accent:  #824027;
  --sidebar-w: 17rem;
  --text: #868e96;
  --text-dark: #1a2e22;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: #fff;
  padding-top: 54px;
}

@media (min-width: 992px) {
  body {
    padding-top: 0;
    padding-left: var(--sidebar-w);
  }
}

/* ====================================================
   Typography
   ==================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

h1 { font-size: 2.25rem; line-height: 1.1; }
h2 { font-size: 1.6rem; letter-spacing: 0; }
h3 { font-size: 1.2rem; }

.subheading {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
}

/* ====================================================
   Sidebar
   ==================================================== */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: #0f3d26;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  text-align: center;
  overflow-y: auto;
  z-index: 100;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
}

#sidebar.open, #sidebar.lg-visible {
  transform: translateX(0);
}

@media (min-width: 992px) {
  #sidebar {
    transform: translateX(0) !important;
  }
}

#sidebar .profile-img {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  border: 2px solid var(--primary);
  margin-bottom: 1rem;
  object-fit: cover;
  background: #1a5c36;
}

#sidebar h1 {
  color: #fff;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
}

#sidebar .sidebar-tagline {
  color: var(--primary);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  font-family: var(--font-body);
  font-weight: 600;
}

/* Nav links */
#sidebar nav a {
  display: block;
  width: 100%;
  padding: 0.45rem 0.75rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 0.25rem;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  text-align: left;
}

#sidebar nav a:hover,
#sidebar nav a.active {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

#sidebar nav a i {
  margin-right: 0.5rem;
  width: 1.2rem;
  color: var(--primary);
}

/* Social icons */
.social-icons {
  display: flex;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 1.5rem;
}

.social-icons a {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #1a5c36;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  text-decoration: none;
  transition: background 0.2s;
}

.social-icons a:hover { background: var(--primary); }

/* ====================================================
   Mobile top navbar
   ==================================================== */
#mobile-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 54px;
  background: #0f3d26;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  z-index: 200;
}

@media (min-width: 992px) {
  #mobile-nav { display: none; }
}

#mobile-nav .brand {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  margin-left: 0.75rem;
}

#hamburger {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

#hamburger:hover { color: #fff; }

/* Overlay */
#overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 90;
}

#overlay.show { display: block; }

/* ====================================================
   Main content sections
   ==================================================== */
.resume-section {
  padding: 5rem 3rem;
  border-bottom: 1px solid #e9ecef;
}

.resume-section:last-child { border-bottom: none; }

.section-title {
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}

/* ====================================================
   Experience
   ==================================================== */
.exp-entry {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.exp-logo {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
  border-radius: 0.25rem;
  padding: 0.25rem;
  border: 1px solid #dee2e6;
  background: #fff;
}

.exp-body .exp-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.01em;
  margin: 0 0 0.1rem;
}

.exp-body .exp-company {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.1rem;
}

.exp-body .exp-period {
  font-size: 0.8rem;
  color: #adb5bd;
  margin-bottom: 0.5rem;
  font-style: italic;
}

.exp-body p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ====================================================
   Skills
   ==================================================== */
.skill-bar-wrap {
  margin-bottom: 1rem;
}

.skill-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  font-family: var(--font-body);
  color: var(--text-dark);
  letter-spacing: 0.08em;
}

.skill-bar-track {
  height: 0.5rem;
  background: #e9ecef;
  border-radius: 999px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  width: 0;
  transition: width 0.8s ease;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.badge {
  background: #e9ecef;
  color: var(--text-dark);
  font-size: 0.75rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-weight: 600;
}

/* ====================================================
   Portfolio
   ==================================================== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.portfolio-card {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.portfolio-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }

.portfolio-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
  background: #f8f9fa;
}

.portfolio-card-body {
  padding: 0.85rem;
}

.portfolio-card-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.portfolio-card-meta {
  font-size: 0.75rem;
  color: #adb5bd;
  margin-bottom: 0.4rem;
}

.portfolio-card-desc {
  font-size: 0.82rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.portfolio-card-env {
  font-size: 0.72rem;
  color: var(--primary);
  font-style: italic;
}

.portfolio-card a.visit {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
}

.portfolio-card a.visit:hover { text-decoration: underline; }

/* ====================================================
   Education
   ==================================================== */
.edu-entry {
  margin-bottom: 1.75rem;
}

.edu-entry .edu-school {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-dark);
}

.edu-entry .edu-degree {
  font-size: 0.9rem;
  color: var(--text);
}

.edu-entry .edu-year {
  font-size: 0.8rem;
  color: #adb5bd;
  font-style: italic;
}

/* ====================================================
   About
   ==================================================== */
#about .lead {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
}

#about .meta-info {
  font-size: 0.82rem;
  color: #adb5bd;
  margin-top: 1.25rem;
}

#about .meta-info i {
  color: var(--primary);
  margin-right: 0.35rem;
  width: 1rem;
  text-align: center;
}

/* ====================================================
   Dividers
   ==================================================== */
hr.section-sep {
  border: none;
  border-top: 1px solid #e9ecef;
  margin: 0;
}
