/* ============================================================
   HAFEES AHAMED — PORTFOLIO STYLES
   Aesthetic: Clean editorial with sharp mono accents
   Fonts: DM Sans (body) + Space Mono (accents/labels)
   ============================================================ */

:root {
  --primary: #0f172a;       /* Deep navy — dominant */
  --accent:  #2563eb;       /* Electric blue — highlights */
  --accent2: #06b6d4;       /* Cyan — secondary accent */
  --surface: #f8fafc;       /* Off-white sections */
  --card-bg: #ffffff;
  --border:  #e2e8f0;
  --text:    #1e293b;
  --muted:   #64748b;
  --light:   #ffffff;

  --font-body:  'DM Sans', sans-serif;
  --font-mono:  'Space Mono', monospace;

  --radius:   12px;
  --radius-sm: 6px;
  --shadow:   0 4px 20px rgba(0,0,0,0.07);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.12);
  --transition: 0.25s ease;
}

/* ============================================================ RESET */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); color: var(--text); background: var(--light); line-height: 1.65; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ============================================================ LAYOUT */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 6rem 0; }
.section-alt { background: var(--surface); }

/* ============================================================ SECTION LABELS */
.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.section-heading {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
  margin-bottom: 3rem;
}

/* ============================================================ BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #1d4ed8; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,99,235,0.35); }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
}
.btn-outline:hover { background: rgba(255,255,255,0.15); border-color: #fff; transform: translateY(-2px); }
.btn-full { width: 100%; justify-content: center; }

/* ============================================================ TAGS / PILLS */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
}
.pill {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  background: #eff6ff;
  color: var(--accent);
  border: 1px solid #bfdbfe;
}

/* ============================================================ NAVBAR */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.nav-logo .dot { color: var(--accent); }

.nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--transition);
  border-radius: 2px;
}
.nav-link:hover { color: var(--primary); }
.nav-link:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.bar { width: 24px; height: 2px; background: var(--primary); border-radius: 2px; transition: var(--transition); }

/* ============================================================ HERO */
.hero {
  min-height: 100vh;
  background: var(--primary);
  color: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 7rem 1.5rem 4rem;
}

/* Subtle dot-grid background */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* Glow orbs */
.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.hero::before { width: 500px; height: 500px; background: rgba(37,99,235,0.25); top: -100px; right: -100px; }
.hero::after  { width: 400px; height: 400px; background: rgba(6,182,212,0.15); bottom: -80px; left: -80px; }

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  animation: heroFadeIn 0.9s ease both;
}
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
  margin-bottom: 2rem;
  background: rgba(255,255,255,0.05);
}
.badge-dot {
  width: 8px; height: 8px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(74,222,128,0.3);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(74,222,128,0.3); }
  50% { box-shadow: 0 0 0 6px rgba(74,222,128,0.1); }
}

.hero-title {
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 700;
  line-height: 0.95;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}
.hero-title .line-1 { display: block; color: #fff; }
.hero-title .line-2 { display: block; color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,0.5); }

.hero-role {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin-bottom: 0.35rem;
}
.hero-uni {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent2);
  margin-bottom: 1.2rem;
  letter-spacing: 0.05em;
}
.hero-tagline {
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 2.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.hero-socials {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
}
.hero-socials a {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  transition: var(--transition);
}
.hero-socials a:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.5); transform: translateY(-2px); }

.hero-scroll {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  color: rgba(255,255,255,0.4);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: scrollBounce 2.5s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================ ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 5rem;
  align-items: center;
}
.about-image-col { display: flex; justify-content: center; }
.profile-frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  width: 340px;
}
.profile-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37,99,235,0.2), rgba(6,182,212,0.1));
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 1;
}
.profile-frame:hover::before { opacity: 1; }
.profile-pic { width: 100%; height: auto; }

.about-text-col p {
  color: var(--muted);
  margin-bottom: 1.2rem;
  font-size: 1rem;
}

.about-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.stat-item { display: flex; flex-direction: column; gap: 0.2rem; }
.stat-num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.stat-label { font-size: 0.8rem; color: var(--muted); font-weight: 500; }

/* ============================================================ EXPERIENCE / TIMELINE */
.timeline { display: flex; flex-direction: column; gap: 1.5rem; }
.timeline-item { display: flex; gap: 1.5rem; }
.timeline-marker {
  flex-shrink: 0;
  margin-top: 1.4rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
  position: relative;
}
.timeline-marker::after {
  content: '';
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100px;
  background: linear-gradient(to bottom, var(--border), transparent);
}
.timeline-card {
  flex: 1;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.timeline-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.timeline-role { font-size: 1.1rem; font-weight: 700; color: var(--primary); margin-bottom: 0.35rem; }
.timeline-org { font-size: 0.9rem; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; }
.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  white-space: nowrap;
}
.timeline-desc { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.2rem; line-height: 1.7; }
.timeline-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ============================================================ SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.skill-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.skill-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.skill-card-icon {
  width: 44px; height: 44px;
  background: #eff6ff;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}
.skill-card h3 { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 1.5rem; }

.skill-list { display: flex; flex-direction: column; gap: 1rem; }
.skill-row { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: 0.75rem; }
.skill-name { font-size: 0.88rem; font-weight: 500; color: var(--text); }
.skill-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.skill-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 3px; transition: width 1.2s cubic-bezier(0.4,0,0.2,1); }
.skill-pct { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); text-align: right; }

.other-skills { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.5rem; }

/* ============================================================ PROJECTS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.project-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.project-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }

.project-header {
  background: var(--card-color, var(--accent));
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  position: relative;
}
.project-icon { font-size: 2.5rem; color: rgba(255,255,255,0.9); }
.project-links { display: flex; gap: 0.5rem; }
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 0.9rem;
  transition: var(--transition);
}
.icon-btn:hover { background: rgba(255,255,255,0.3); transform: scale(1.1); }

.project-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.project-body h3 { font-size: 1.05rem; font-weight: 700; color: var(--primary); margin-bottom: 0.75rem; }
.project-body p { color: var(--muted); font-size: 0.9rem; line-height: 1.7; flex: 1; margin-bottom: 1.2rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ============================================================ VOLUNTEERING */
.vol-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.vol-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  gap: 1.5rem;
  transition: var(--transition);
}
.vol-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.vol-icon {
  flex-shrink: 0;
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.3rem;
}
.vol-content { flex: 1; }
.vol-content h3 { font-size: 1.05rem; font-weight: 700; color: var(--primary); margin-bottom: 0.3rem; }
.vol-role { font-size: 0.85rem; font-weight: 600; color: var(--accent); margin-bottom: 0.7rem; }
.vol-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.65; margin-bottom: 1rem; }
.vol-date { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; }

/* ============================================================ CONTACT */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.contact-intro { color: var(--muted); font-size: 1rem; line-height: 1.7; margin-bottom: 2rem; }
.contact-links { display: flex; flex-direction: column; gap: 1rem; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.contact-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #bfdbfe; }
.contact-card-icon {
  width: 42px; height: 42px;
  background: #eff6ff;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}
.contact-card-label { font-size: 0.75rem; color: var(--muted); font-weight: 500; margin-bottom: 0.15rem; }
.contact-card-value { font-size: 0.9rem; font-weight: 600; color: var(--primary); }

.contact-form-wrapper {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.form-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.25rem; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.form-group input,
.form-group textarea {
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
  background: #fff;
}

/* ============================================================ FOOTER */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-copy { font-size: 0.85rem; }
.footer-social { display: flex; gap: 1rem; }
.footer-social a {
  color: rgba(255,255,255,0.5);
  font-size: 1.1rem;
  transition: color var(--transition);
}
.footer-social a:hover { color: #fff; }

/* ============================================================ SCROLL ANIMATION */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================ RESPONSIVE */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; text-align: center; }
  .profile-frame { width: 280px; margin: 0 auto; }
  .about-stats { justify-content: center; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 768px) {
  .nav-list {
    display: none;
    position: absolute;
    top: 66px; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 1.25rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  }
  .nav-list.open { display: flex; }
  .nav-toggle { display: flex; }

  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .vol-grid { grid-template-columns: 1fr; }
  .section { padding: 4rem 0; }
  .hero-title { letter-spacing: -0.02em; }
  .hero-title .line-2 { -webkit-text-stroke: 1.5px rgba(255,255,255,0.5); }
}

@media (max-width: 480px) {
  .hero { padding: 6rem 1rem 4rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
  .timeline-header { flex-direction: column; }
  .vol-card { flex-direction: column; }
  .about-stats { flex-wrap: wrap; gap: 1.5rem; }
  .skill-row { grid-template-columns: 90px 1fr 30px; }
}
