/* ─── Reset & Base ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-light: #eef2ff;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.09), 0 8px 16px rgba(0, 0, 0, 0.05);
  --radius: 12px;
  --radius-sm: 7px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
  color: var(--text);
  background: var(--bg-alt);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* ─── Hero ─── */
#about {
  padding: 96px 0 80px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.hero-name {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 18px;
}

.hero-bio {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.8;
  margin-bottom: 28px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.skill-tag {
  background: var(--accent-light);
  color: var(--accent);
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 0.775rem;
  font-weight: 600;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 44px;
}

.social-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.social-bar a {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s;
}

.social-bar a:hover {
  color: var(--accent);
}

.social-bar svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ─── Projects ─── */
#projects {
  padding: 80px 0 96px;
  background: var(--bg-alt);
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 6px;
}

.section-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ─── Card ─── */
.card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-media {
  height: 186px;
  overflow: hidden;
  flex-shrink: 0;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-media img {
  transform: scale(1.04);
}

.card-banner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.75rem;
}

/* Banner gradient presets */
.b-indigo {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.b-blue {
  background: linear-gradient(135deg, #3b82f6, #0ea5e9);
}

.b-orange {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.b-green {
  background: linear-gradient(135deg, #10b981, #3b82f6);
}

.b-pink {
  background: linear-gradient(135deg, #ec4899, #f97316);
}

.b-purple {
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
}

.b-teal {
  background: linear-gradient(135deg, #14b8a6, #6366f1);
}

.b-slate {
  background: linear-gradient(135deg, #475569, #1e293b);
}

.card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-date {
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 6px;
}

.card-title {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 8px;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
}

.card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1;
}

.tech {
  background: var(--bg-alt);
  color: var(--text-muted);
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ─── Contact / Footer ─── */
#contact {
  padding: 80px 0;
  background: var(--text);
  text-align: center;
}

.contact-heading {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
  margin-bottom: 10px;
}

.contact-sub {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.975rem;
  margin-bottom: 36px;
}

.contact-items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.15s;
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.contact-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.footer-bottom {
  margin-top: 52px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.22);
}

/* ─── Responsive ─── */
@media (max-width: 960px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  #about {
    padding: 56px 0 48px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-wrap: wrap;
  }

  .nav-link {
    display: none;
  }

  .contact-items {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-item {
    justify-content: center;
  }
}