/* ============================================================
   E-Portfolio Template — single shared stylesheet
   Students: change the 4 CSS variables below to retheme everything
   ============================================================ */

:root {
  --accent:    #2563eb;   /* primary colour — buttons, links, highlights */
  --accent-dark: #1d4ed8;
  --bg:        #f8fafc;   /* page background */
  --surface:   #ffffff;   /* card / panel background */
  --text:      #1e293b;   /* body text */
  --muted:     #64748b;   /* secondary / placeholder text */
  --border:    #e2e8f0;
  --radius:    0.5rem;
  --shadow:    0 2px 8px rgba(0,0,0,.08);
  --font:      'Segoe UI', system-ui, sans-serif;
  --max-w:     1100px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout helpers ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.section    { padding: 4rem 0; }
.section-alt { background: var(--surface); }

/* ── Nav ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem;
  height: 3.5rem;
}
.nav-brand { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a { color: var(--muted); font-size: .95rem; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); text-decoration: none; }

/* Mobile nav — pure CSS checkbox trick */
.nav-toggle-label { display: none; cursor: pointer; padding: .5rem; }
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .3s;
}
.nav-toggle-label span::before { content: ''; margin-top: 5px; }
.nav-toggle-label span::after  { content: ''; margin-top: 5px; }
#nav-toggle { display: none; }

@media (max-width: 600px) {
  .nav-toggle-label { display: block; }
  .nav-links {
    display: none; flex-direction: column; gap: 0;
    position: absolute; top: 3.5rem; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  .nav-links a { display: block; padding: .75rem 1.25rem; border-top: 1px solid var(--border); }
  #nav-toggle:checked ~ .nav-inner .nav-links { display: flex; }
}

/* ── Buttons ── */
.btn {
  display: inline-block; padding: .55rem 1.3rem;
  background: var(--accent); color: #fff;
  border-radius: var(--radius); font-size: .9rem; font-weight: 600;
  border: 2px solid var(--accent); transition: background .2s, color .2s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); text-decoration: none; }
.btn-outline {
  background: transparent; color: var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; }

/* ── Hero ── */
.hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(135deg, var(--surface) 60%, #eff6ff 100%);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  display: flex; align-items: center; gap: 3rem;
  flex-wrap: wrap;
}
.hero-text { flex: 1; min-width: 260px; }
.hero-text h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.2; }
.hero-text h1 span { color: var(--accent); }
.hero-text p { color: var(--muted); margin: 1rem 0 1.5rem; max-width: 480px; }
.hero-btns { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero-photo {
  width: 180px; height: 180px; border-radius: 50%;
  object-fit: cover; border: 4px solid var(--accent);
  background: var(--border);
  flex-shrink: 0;
}
.stats { display: flex; gap: 2rem; margin-top: 2rem; flex-wrap: wrap; }
.stat strong { display: block; font-size: 1.5rem; color: var(--accent); }
.stat span { font-size: .85rem; color: var(--muted); }

/* ── Section headings ── */
.section-title {
  font-size: 1.6rem; margin-bottom: .4rem;
}
.section-sub {
  color: var(--muted); margin-bottom: 2.5rem;
}

/* ── Cards grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.card h3 { margin-bottom: .5rem; }
.card p  { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }
.badge-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.badge {
  font-size: .75rem; padding: .2rem .6rem;
  background: #eff6ff; color: var(--accent);
  border-radius: 999px; border: 1px solid #bfdbfe;
}

/* ── Skills ── */
.skill-list { display: flex; flex-direction: column; gap: 1rem; }
.skill-item label {
  display: flex; justify-content: space-between;
  font-size: .9rem; margin-bottom: .3rem;
}
.skill-bar {
  height: 8px; background: var(--border); border-radius: 999px; overflow: hidden;
}
.skill-bar-fill {
  height: 100%; background: var(--accent); border-radius: 999px;
  animation: grow .8s ease forwards;
  transform-origin: left;
}
@keyframes grow { from { width: 0; } }

.soft-grid {
  display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem;
}
.soft-badge {
  padding: .4rem 1rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: .85rem;
}

/* ── Timeline (resume) ── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute;
  left: .6rem; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-dot {
  position: absolute; left: -2rem; top: .3rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline-item h4 { font-size: 1rem; }
.timeline-item .meta {
  font-size: .82rem; color: var(--muted); margin-bottom: .3rem;
}
.timeline-item p { font-size: .9rem; color: var(--muted); }

/* ── Contact form ── */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start;
}
@media (max-width: 600px) { .contact-grid { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: .9rem; margin-bottom: .35rem; font-weight: 500; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: .6rem .85rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--font); font-size: .95rem; color: var(--text);
  background: var(--surface); transition: border-color .2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.form-group textarea { resize: vertical; min-height: 130px; }

.social-links { display: flex; flex-direction: column; gap: .9rem; }
.social-link {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface);
  color: var(--text); transition: border-color .2s, box-shadow .2s;
}
.social-link:hover { border-color: var(--accent); box-shadow: var(--shadow); text-decoration: none; }
.social-icon { font-size: 1.2rem; width: 1.5rem; text-align: center; }

/* ── Footer ── */
footer {
  text-align: center; padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: .85rem;
}
