/* =============================
   Variables
============================= */
:root {
  --bg: #0F0F0F;
  --card: #1A1A1A;
  --muted: #B0B0B0;
  --accent: #D4AF37;
  --btn-hover: #FFD700;
  --shadow: rgba(0,0,0,0.5);
  --font: 'Poppins', sans-serif;
  --glass: rgba(255,255,255,0.05);
}

/* =============================
   Global Styles
============================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: #fff; line-height: 1.6; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
a { text-decoration: none; transition: all 0.3s ease; }
p.muted { color: var(--muted); }
html { scroll-behavior: smooth; }

/* =============================
   Header
============================= */
header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; }
.brand .title { font-weight: 700; font-size: 1.5rem; }
.brand .subtitle { font-weight: 300; font-size: 0.9rem; color: var(--muted); }
nav a { color: var(--accent); margin-left: 1rem; font-weight: 600; }
nav a:hover { color: var(--btn-hover); }

/* =============================
   Hero Section
============================= */
.hero { background: linear-gradient(135deg, #0F0F0F, #1A1A1A); padding: 4rem 2rem; text-align: center; border-radius: 1rem; box-shadow: 0 4px 12px var(--shadow); margin-bottom: 4.5rem; }
.hero h1 { font-size: 3rem; margin-bottom: 0.5rem; }
.hero .muted { color: var(--muted); font-size: 1.2rem; margin-bottom: 1.5rem; }
.hero-actions .btn { margin-right: 1rem; margin-top: 1rem; }

/* =============================
   Buttons
============================= */
.btn { padding: 0.6rem 1.2rem; border-radius: 12px; border: none; cursor: pointer; font-weight: 600; transition: all 0.3s ease; }
.btn.primary { background: var(--accent); color: #000; }
.btn.primary:hover { background: var(--btn-hover); color: #0F0F0F; transform: translateY(-2px); }
.icon-btn { background: transparent; color: var(--accent); border: 1px solid var(--accent); padding: 0.4rem 0.8rem; border-radius: 12px; font-size: 0.9rem; }
.icon-btn:hover { background: var(--accent); color: #000; transform: translateY(-1px); }

/* =============================
   Social Links
============================= */
.social-links a { color: var(--accent); margin: 0 0.5rem; font-weight: 600; transition: color 0.2s; }
.social-links a:hover { color: var(--btn-hover); }

/* =============================
   Grid Layouts
============================= */
.grid, .credentials-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 2rem; }

/* =============================
   Project & Credential Cards
============================= */
.card, .credential-card {
  background: linear-gradient(135deg, rgba(212,175,55,0.05), rgba(255,255,255,0.02));
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: left;
  box-shadow: 0 4px 12px var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 260px;
}

.card:hover, .credential-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 30px rgba(212,175,55,0.3);
}

.card h3, .credential-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: #fff; }
.card p, .credential-card p { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.8rem; line-height: 1.4; }
.chip { display: inline-block; background: rgba(212,175,55,0.15); color: var(--accent); padding: 0.3rem 0.8rem; border-radius: 12px; font-size: 0.85rem; margin-right: 0.4rem; transition: background 0.3s; }
.chip:hover { background: rgba(212,175,55,0.35); }
.issued-date { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }

/* Ensure uniform card height */
.card, .credential-card {
  min-height: 260px; /* same height for all cards */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Projects & Credentials Grid */
.grid, .credentials-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 2 per row on desktop */
  margin-top: 2rem;
}

/* Optional: Force exactly 2 per row on larger screens */
@media (min-width: 768px) {
  .grid, .credentials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.credential-card img {
  width: 90px;      /* Adjust size if needed */
  margin-bottom: 1rem;
  max-width: 100%;
  height: auto;
}

/* =============================
   About Section
============================= */
#about { margin-bottom: 4rem; }
#about p { color: var(--muted); line-height: 1.6; }

/* =============================
   Footer
============================= */
footer { margin-top: 4rem; padding: 2rem 0; text-align: center; color: var(--muted); }
footer .accent { color: var(--accent); }

/* =============================
   Sections & Headings
============================= */
section { border-top: 1px solid rgba(212,175,55,0.1); padding-top: 3rem; padding-bottom: 3rem; border-radius: 16px; }
h2 { margin-top: 3rem; margin-bottom: 1.5rem; font-size: 2rem; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }

/* =============================
   Fade-in Animation
============================= */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in.show { opacity: 1; transform: translateY(0); }

/* =============================
   Modal
============================= */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal.show { display: flex; }
.modal-card { background: var(--glass); backdrop-filter: blur(10px); padding: 2rem; border-radius: 1rem; max-width: 500px; width: 90%; box-shadow: 0 10px 30px rgba(0,0,0,0.6); }
.modal-card h3 { margin-top: 0; }
.modal-card ul { padding-left: 1.2rem; }
.modal-card li { margin-bottom: 0.5rem; }
.modal-card .btn { margin-bottom: 1rem; }

/* =============================
   Responsive Adjustments
============================= */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .hero .muted { font-size: 1rem; }
  nav a { font-size: 0.9rem; }
}


.hero-links {
  display: flex;
  justify-content: center;
  gap: 2rem;              /* controls spacing between items */
  margin-top: 1.8rem;
  flex-wrap: wrap;        /* prevents ugly stacking on mobile */
}

.hero-link {
  position: relative;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  padding-bottom: 4px;
}


/* subtle underline animation */
.hero-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.hero-link:hover::after {
  width: 100%;
}

.hero-link:hover {
  color: #FFD700;
}
