/* ==========================================
   Custom Portfolio CSS — Butterfly Theme
   Dark Palette Edition
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* ---- CSS Variables ---- */
:root {
  --accent: #34D399;
  --accent-light: #6EE7B7;
  --accent-dark: #059669;
  --card-radius: 12px;
  --card-bg-dark: #1a1a2e;
  --card-border: rgba(52, 211, 153, 0.15);
  --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --card-hover-shadow: 0 8px 40px rgba(5, 150, 105, 0.35);
  --tag-bg: rgba(52, 211, 153, 0.10);
  --tag-color: var(--accent);
  --surface: #16213e;
  --surface-2: #0f3460;
}

/* Force dark background on the whole page */
body,
#web,
.layout {
  background-color: #0d0d1a !important;
}

/* ==========================================
   CARDS — Universal dark card style
   ========================================== */

.project-card,
.skill-group,
.contact-card {
  background: var(--card-bg-dark) !important;
  border: 1px solid var(--card-border) !important;
  box-shadow: var(--card-shadow) !important;
}

/* ==========================================
   PORTFOLIO PAGE
   ========================================== */

.portfolio-page {
  max-width: 1100px;
  margin: 0 auto;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  margin: 32px 0;
}

.project-card {
  border-radius: var(--card-radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-hover-shadow) !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
}

/* Project Image */
.project-img {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.project-card:hover .project-img img {
  transform: scale(1.06);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 150, 105, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.btn-play {
  background: #fff;
  color: #065f46;
  padding: 10px 22px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.2s, color 0.2s;
}

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

/* Project Info */
.project-info {
  padding: 20px;
}

.project-info h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #e2e8f0;
}

.project-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #94a3b8;
  margin: 0 0 12px;
}

/* Tags */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.tag {
  background: var(--tag-bg);
  color: var(--accent-light);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 50px;
  letter-spacing: 0.02em;
  border: 1px solid rgba(52, 211, 153, 0.2);
}

/* Project Links */
.project-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.project-links a {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}

.project-links a:hover {
  color: var(--accent-light);
}

.link-detail {
  color: #64748b !important;
  font-size: 0.82rem !important;
}

/* CTA Banner */
.portfolio-cta {
  text-align: center;
  padding: 24px;
  background: var(--card-bg-dark);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  margin-top: 20px;
}

.portfolio-cta p {
  margin: 0;
  font-size: 1rem;
  color: #94a3b8;
}

.portfolio-cta a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

/* ==========================================
   HOME PAGE
   ========================================== */

.home-intro {
  text-align: center;
  padding: 32px 0 20px;
}

.home-intro p {
  font-size: 1.1rem;
  color: #94a3b8;
  margin-bottom: 20px;
}

.home-cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.section-more {
  text-align: center;
  margin: 8px 0 32px;
}

.section-more a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  font-size: 0.95rem;
}

.section-more a:hover {
  color: var(--accent-light);
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-dark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4);
}

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.55);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent-dark);
}

.btn-secondary:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
}

/* ==========================================
   RESUME BUTTON
   ========================================== */

.btn-resume {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  background: #7f1d1d;
  color: #fca5a5;
  border: 1px solid #991b1b;
  border-radius: 50px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(127, 29, 29, 0.4);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  margin-top: 14px;
}

.btn-resume:hover {
  background: #991b1b;
  color: #fee2e2;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(153, 27, 27, 0.5);
}

.btn-resume.large {
  font-size: 1rem;
  padding: 13px 32px;
}

.resume-btn-wrap {
  margin-top: 4px;
}

.resume-section {
  margin-top: 40px;
  padding: 28px;
  background: var(--card-bg-dark);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  text-align: center;
}

.resume-section p {
  font-size: 1rem;
  margin: 0 0 12px;
  color: #94a3b8;
}

/* ==========================================
   ABOUT PAGE
   ========================================== */

.about-page {
  max-width: 860px;
  margin: 0 auto;
}

.about-hero {
  display: flex;
  align-items: center;
  gap: 36px;
  margin: 20px 0 40px;
  flex-wrap: wrap;
}

.about-avatar img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #059669;
  box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.12), 0 0 30px rgba(5, 150, 105, 0.2);
}

.about-intro h1 {
  font-size: 2rem;
  margin: 0 0 8px;
  line-height: 1.2;
  color: #000000;
}

.highlight {
  color: var(--accent);
}

.about-tagline {
  font-size: 1rem;
  color: #3a3c3f;
  margin: 0 0 14px;
}

/* Social Row */
.about-social-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.about-social-row a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.2);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s, border-color 0.2s;
}

.about-social-row a:hover {
  background: #059669;
  border-color: #059669;
  color: #fff;
  transform: translateY(-2px);
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.skill-group {
  border-radius: var(--card-radius);
  padding: 18px 20px;
}

.skill-group h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.skill-group ul {
  margin: 0;
  padding-left: 16px;
  list-style: disc;
}

.skill-group li {
  font-size: 0.87rem;
  color: #94a3b8;
  line-height: 1.8;
}

/* Contact Grid */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.contact-card {
  border-radius: var(--card-radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.9rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
}

.contact-card i {
  font-size: 1.3rem;
  color: var(--accent);
  min-width: 22px;
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-hover-shadow) !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
  color: var(--accent-light);
}

/* ==========================================
   PROJECT DETAIL PAGE
   ========================================== */

.project-detail {
  max-width: 820px;
  margin: 0 auto;
}

.project-meta-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.media-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin: 20px 0;
  background: #0d0d1a;
  border-radius: var(--card-radius);
  overflow: hidden;
  border: 1px solid var(--card-border);
}

.media-embed iframe,
.media-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 640px) {
  .project-grid { grid-template-columns: 1fr; }
  .about-hero { flex-direction: column; text-align: center; }
  .about-social-row { justify-content: center; }
  .about-intro h1 { font-size: 1.6rem; }
  .skills-grid, .contact-grid { grid-template-columns: 1fr 1fr; }
  .home-cta-row { flex-direction: column; align-items: center; }
}

@media (max-width: 420px) {
  .skills-grid, .contact-grid { grid-template-columns: 1fr; }
}

/* ==========================================
   FOOTER — White background, dark text
   ========================================== */

#footer,
#footer-wrap,
.footer-inner,
footer {
  background: #7f808b !important;
  background-image: none !important;
}

#footer *,
footer * {
  color: #000000 !important;
}

#footer a,
footer a {
  color: #000000 !important;
}

#footer a:hover,
footer a:hover {
  color: #ffffff !important;
}

/* ==========================================
   ABOUT PAGE — CV button & contact cards unified
   Deep navy background, green text & icons
   ========================================== */

/* Unified dark-navy contact card style */
.contact-card,
.btn-resume {
  background: #0f2744 !important;
  border: 1px solid rgba(52, 211, 153, 0.25) !important;
  color: #34D399 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
}

.btn-resume {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: 50px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
  margin-top: 14px;
}

.btn-resume i,
.contact-card i {
  color: #34D399 !important;
}

.btn-resume:hover,
.contact-card:hover {
  background: #0a1f38 !important;
  border-color: rgba(52, 211, 153, 0.5) !important;
  color: #6EE7B7 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.3) !important;
}

.btn-resume:hover i,
.contact-card:hover i {
  color: #6EE7B7 !important;
}

.btn-resume.large {
  font-size: 1rem;
  padding: 13px 32px;
}

.resume-btn-wrap {
  margin-top: 4px;
}

.resume-section {
  margin-top: 40px;
  padding: 28px;
  background: var(--card-bg-dark);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  text-align: center;
}

.resume-section p {
  font-size: 1rem;
  margin: 0 0 12px;
  color: #94a3b8;
}
