/*
  Modern Theme Styles for Designs by Teck
  - Inter font, teal accent, light/dark theme
  - Sticky header, bold hero, modern grids, fade-in, floating labels
  - Responsive and accessible
*/

:root {
  --font-main: 'Inter', Arial, sans-serif;
  --color-bg-light: #f8fafc;
  --color-bg-dark: #181c20;
  --color-text-light: #222;
  --color-text-dark: #f8fafc;
  --color-accent: #14b8a6;
  --color-accent-dark: #0e9488;
  --color-header-bg: rgba(255,255,255,0.85);
  --color-header-bg-dark: rgba(24,28,32,0.95);
  --color-card-bg: #fff;
  --color-card-bg-dark: #23272f;
  --color-border: #e5e7eb;
  --color-border-dark: #23272f;
  --transition: 0.3s cubic-bezier(.4,0,.2,1);
}

body {
  font-family: var(--font-main);
  background: var(--color-bg-light);
  color: var(--color-text-light);
  transition: background var(--transition), color var(--transition);
}
body.theme-dark {
  background: var(--color-bg-dark);
  color: var(--color-text-dark);
}

/* Sticky Transparent Header */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-header-bg);
  backdrop-filter: blur(8px);
  transition: background var(--transition), box-shadow var(--transition);
}
body.theme-dark .sticky-header {
  background: var(--color-header-bg-dark);
}

.site-header {
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

/* Navigation */
.main-menu .menu-item a {
  color: var(--color-text-light);
  font-weight: 600;
  padding: 0.5em 1em;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}
body.theme-dark .main-menu .menu-item a {
  color: var(--color-text-dark);
}
.main-menu .menu-item a:hover, .main-menu .menu-item a:focus {
  background: var(--color-accent);
  color: #fff;
}

.theme-toggle-container button {
  background: none;
  border: none;
  font-size: 1.2em;
  color: var(--color-accent);
  cursor: pointer;
  transition: color var(--transition);
}

/* Hero Section */
.modern-hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(120deg, #f0fdfa 0%, #e0f2fe 100%);
  overflow: hidden;
}
body.theme-dark .modern-hero {
  background: linear-gradient(120deg, #181c20 0%, #23272f 100%);
}
.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5em;
  color: var(--color-text-light);
}
body.theme-dark .hero-title {
  color: var(--color-text-dark);
}
.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 2em;
  color: var(--color-text-light);
  opacity: 0.85;
}
body.theme-dark .hero-subtitle {
  color: var(--color-text-dark);
}
.cta-buttons .btn {
  margin-right: 1em;
}

/* Animated Hero Background Shapes */
.hero-bg-shapes {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}
.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  animation: float 8s ease-in-out infinite alternate;
}
.shape-1 {
  width: 400px; height: 400px;
  background: var(--color-accent);
  top: -100px; left: -100px;
  animation-delay: 0s;
}
.shape-2 {
  width: 300px; height: 300px;
  background: #38bdf8;
  bottom: -80px; right: -80px;
  animation-delay: 2s;
}
@keyframes float {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-30px) scale(1.05); }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75em 2em;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1em;
  border: none;
  background: var(--color-card-bg);
  color: var(--color-accent);
  box-shadow: 0 2px 8px rgba(20,184,166,0.08);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  text-decoration: none;
}
.btn-primary, .btn.accent {
  background: var(--color-accent);
  color: #fff;
}
.btn-secondary {
  background: #fff;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}
.btn:hover, .btn:focus {
  box-shadow: 0 4px 16px rgba(20,184,166,0.15);
  background: var(--color-accent-dark);
  color: #fff;
}

/* Section Fade-in Animation */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--transition), transform 0.8s var(--transition);
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* Services & Portfolio Grid */
.services-grid, .portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2em;
  margin-top: 2em;
}
.service-card, .portfolio-item {
  background: var(--color-card-bg);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(20,184,166,0.06);
  padding: 2em 1.5em;
  transition: box-shadow var(--transition), transform var(--transition), background var(--transition);
  border: 1px solid var(--color-border);
  position: relative;
}
body.theme-dark .service-card, body.theme-dark .portfolio-item {
  background: var(--color-card-bg-dark);
  border: 1px solid var(--color-border-dark);
}
.service-card:hover, .portfolio-item:hover {
  box-shadow: 0 8px 32px rgba(20,184,166,0.18);
  transform: translateY(-6px) scale(1.02);
}

/* Portfolio Overlay */
.portfolio-image {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}
.portfolio-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(120deg, var(--color-accent) 60%, #38bdf8 100%);
  color: #fff;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition);
  z-index: 2;
}
.portfolio-image:hover .portfolio-overlay {
  opacity: 0.95;
}

/* About Section */
.about-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3em;
  margin-top: 2em;
}
.about-photo img {
  width: 220px;
  border-radius: 50%;
  box-shadow: 0 4px 24px rgba(20,184,166,0.10);
  background: #fff;
}
.about-content {
  flex: 1 1 320px;
}
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  margin-top: 1.5em;
  list-style: none;
  padding: 0;
}
.skills-list li {
  background: var(--color-accent);
  color: #fff;
  border-radius: 6px;
  padding: 0.5em 1.2em;
  font-weight: 600;
  font-size: 1em;
}

/* Contact Section & Floating Label Form */
.contact-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 3em;
  align-items: flex-start;
  margin-top: 2em;
}
.contact-info {
  flex: 1 1 260px;
}
.contact-form {
  flex: 2 1 340px;
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}
.form-group {
  position: relative;
  margin-bottom: 1.5em;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1.2em 1em 0.6em 1em;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-card-bg);
  color: var(--color-text-light);
  font-size: 1em;
  transition: border var(--transition), background var(--transition), color var(--transition);
  outline: none;
  resize: none;
}
body.theme-dark .form-group input,
body.theme-dark .form-group textarea {
  background: var(--color-card-bg-dark);
  color: var(--color-text-dark);
  border: 1.5px solid var(--color-border-dark);
}
.form-group label {
  position: absolute;
  left: 1em;
  top: 1.1em;
  color: #888;
  font-size: 1em;
  pointer-events: none;
  background: transparent;
  transition: all 0.2s;
}
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -0.7em;
  left: 0.8em;
  font-size: 0.85em;
  color: var(--color-accent);
  background: rgba(0, 0, 0, 0.1);
  padding: 0 0.3em;
}
body.theme-dark .form-group input:focus + label,
body.theme-dark .form-group input:not(:placeholder-shown) + label,
body.theme-dark .form-group textarea:focus + label,
body.theme-dark .form-group textarea:not(:placeholder-shown) + label {
  background: var(--color-card-bg-dark);
}

/* Responsive Design */
@media (max-width: 900px) {
  .about-inner, .contact-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 2em;
  }
  .services-grid, .portfolio-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .hero-title {
    font-size: 2.1rem;
  }
  .hero-subtitle {
    font-size: 1.1rem;
  }
  .about-photo img {
    width: 120px;
  }
} 

/* --- DARK MODE OVERRIDES for legacy/old CSS --- */
.theme-dark, [data-theme="dark"] {
  /* General background and text */
  background-color: var(--color-bg-dark) !important;
  color: var(--color-text-dark) !important;
}

.theme-dark .container,
[data-theme="dark"] .container {
  background: transparent !important;
  color: var(--color-text-dark) !important;
}

.theme-dark .services-section,
[data-theme="dark"] .services-section {
  background: #181c20 !important;
  color: #f8fafc !important;
}
.theme-dark .service-card,
[data-theme="dark"] .service-card {
  background: #23272f !important;
  color: #f8fafc !important;
  border-color: #23272f !important;
}
.theme-dark .service-card.premium::before,
[data-theme="dark"] .service-card.premium::before {
  background: linear-gradient(to bottom, #14b8a6, #38bdf8) !important;
}
.theme-dark .service-icon,
[data-theme="dark"] .service-icon {
  background-color: rgba(20,184,166,0.15) !important;
  color: #14b8a6 !important;
}
.theme-dark .service-card:hover .service-icon,
[data-theme="dark"] .service-card:hover .service-icon {
  background-color: #14b8a6 !important;
  color: #fff !important;
}

.theme-dark .portfolio-section,
[data-theme="dark"] .portfolio-section {
  background: #181c20 !important;
  color: #f8fafc !important;
}
.theme-dark .portfolio-item,
[data-theme="dark"] .portfolio-item {
  background: #23272f !important;
  color: #f8fafc !important;
  border-color: #23272f !important;
}
.theme-dark .portfolio-overlay,
[data-theme="dark"] .portfolio-overlay {
  background: linear-gradient(120deg, #14b8a6 60%, #38bdf8 100%) !important;
  color: #fff !important;
}

.theme-dark .about-section,
[data-theme="dark"] .about-section {
  background: #181c20 !important;
  color: #f8fafc !important;
}
.theme-dark .about-photo img,
[data-theme="dark"] .about-photo img {
  background: #23272f !important;
}
.theme-dark .skills-list li,
[data-theme="dark"] .skills-list li {
  background: #14b8a6 !important;
  color: #fff !important;
}

.theme-dark .contact-section,
[data-theme="dark"] .contact-section {
  background: #181c20 !important;
  color: #f8fafc !important;
}
.theme-dark .contact-form,
[data-theme="dark"] .contact-form {
  background: transparent !important;
  color: #f8fafc !important;
}
.theme-dark .form-group input,
.theme-dark .form-group textarea,
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
  background: #23272f !important;
  color: #f8fafc !important;
  border-color: #23272f !important;
}
.theme-dark .form-group label,
[data-theme="dark"] .form-group label {
  color: #b5c2d6 !important;
}

/* General card/section override */
.theme-dark .card,
[data-theme="dark"] .card {
  background: #23272f !important;
  color: #f8fafc !important;
  border-color: #23272f !important;
}

/* Section headers, buttons, and links */
.theme-dark .section-header h2,
[data-theme="dark"] .section-header h2 {
  color: #f8fafc !important;
}
.theme-dark a,
[data-theme="dark"] a {
  color: #050505;
}
.theme-dark a:hover,
[data-theme="dark"] a:hover {
  color: #14b8a6;
}

/* Remove unwanted white backgrounds from legacy styles */
.theme-dark [style*="background-color: #fff"],
[data-theme="dark"] [style*="background-color: #fff"] {
  background-color: #23272f !important;
} 

/* --- DARK MODE HERO OVERRIDE --- */
.theme-dark .modern-hero,
[data-theme="dark"] .modern-hero {
  background: linear-gradient(120deg, #181c20 0%, #23272f 100%) !important;
}
.theme-dark .hero-title,
[data-theme="dark"] .hero-title,
.theme-dark .hero-subtitle,
[data-theme="dark"] .hero-subtitle {
  color: #f8fafc !important;
}
.theme-dark .hero-bg-shapes .shape-1,
[data-theme="dark"] .hero-bg-shapes .shape-1 {
  background: #14b8a6 !important;
}
.theme-dark .hero-bg-shapes .shape-2,
[data-theme="dark"] .hero-bg-shapes .shape-2 {
  background: #38bdf8 !important;
} 

/* --- DARK MODE HEADER & NAV TEXT OVERRIDE --- */
.theme-dark .site-header,
[data-theme="dark"] .site-header {
  color: #f8fafc !important;
}
.theme-dark .main-menu .menu-item a,
[data-theme="dark"] .main-menu .menu-item a {
  color: #f8fafc !important;
}
.theme-dark .main-menu .menu-item a:hover,
[data-theme="dark"] .main-menu .menu-item a:hover {
  background: #14b8a6 !important;
  color: #fff !important;
}
.theme-dark .theme-toggle-container button,
[data-theme="dark"] .theme-toggle-container button {
  color: #38bdf8 !important;
} 

/* --- LIGHT MODE HERO TEXT CONTRAST --- */
body.theme-light .hero-title,
.hero-title {
  color: #1a202c;
}
body.theme-light .hero-subtitle,
.hero-subtitle {
  color: #334155;
} 

/* --- MODERN FOOTER STYLES --- */
.site-footer {
  background: #f8fafc;
  color: #1e293b;
  padding: 60px 0 20px;
  transition: background 0.3s, color 0.3s;
}
.theme-dark .site-footer,
[data-theme="dark"] .site-footer {
  background: #181c20;
  color: #f8fafc;
}
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
  align-items: flex-start;
}
.footer-logo h3 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: #1e293b;
}
.theme-dark .footer-logo h3,
[data-theme="dark"] .footer-logo h3 {
  color: #f8fafc;
}
.footer-logo .highlight {
  color: #14b8a6;
  position: relative;
}
.footer-logo p {
  color: #64748b;
  margin-bottom: 0;
}
.theme-dark .footer-logo p,
[data-theme="dark"] .footer-logo p {
  color: #b5c2d6;
}
.footer-nav h4,
.footer-contact h4 {
  font-size: 1.1rem;
  margin-bottom: 18px;
  color: #1e293b;
}
.theme-dark .footer-nav h4,
.theme-dark .footer-contact h4,
[data-theme="dark"] .footer-nav h4,
[data-theme="dark"] .footer-contact h4 {
  color: #f8fafc;
}
.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav ul li {
  margin-bottom: 10px;
}
.footer-nav ul li a {
  color: #64748b;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s;
}
.footer-nav ul li a:hover {
  color: #14b8a6;
}
.theme-dark .footer-nav ul li a,
[data-theme="dark"] .footer-nav ul li a {
  color: #b5c2d6;
}
.theme-dark .footer-nav ul li a:hover,
[data-theme="dark"] .footer-nav ul li a:hover {
  color: #38bdf8;
}
.footer-contact p {
  color: #64748b;
  margin-bottom: 12px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.theme-dark .footer-contact p,
[data-theme="dark"] .footer-contact p {
  color: #b5c2d6;
}
.footer-contact a {
  color: #14b8a6;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-contact a:hover {
  color: #0e9488;
  text-decoration: underline;
}
.footer-contact i {
  font-size: 1.1em;
  margin-right: 6px;
  color: #14b8a6;
}
.footer-social {
  margin-top: 10px;
  display: flex;
  gap: 16px;
}
.footer-social a {
  color: #64748b;
  font-size: 1.3em;
  background: #e0f2fe;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, filter 0.2s, opacity 0.2s;
  filter: blur(1.5px);
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}
.footer-social a:hover {
  background: #14b8a6;
  color: #fff;
  filter: blur(1.5px);
  opacity: 0.5;
  cursor: not-allowed;
}
.theme-dark .footer-social a,
[data-theme="dark"] .footer-social a {
  color: #b5c2d6;
  background: #23272f;
  filter: blur(1.5px);
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}
.theme-dark .footer-social a:hover,
[data-theme="dark"] .footer-social a:hover {
  background: #14b8a6;
  color: #fff;
  filter: blur(1.5px);
  opacity: 0.5;
  cursor: not-allowed;
}
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(30,41,59,0.08);
  color: #64748b;
  font-size: 0.95rem;
}
.theme-dark .footer-bottom,
[data-theme="dark"] .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  color: #b5c2d6;
}
.footer-social-note {
  font-size: 0.95em;
  color: #94a3b8;
  margin-top: 6px;
  text-align: left;
}
.theme-dark .footer-social-note,
[data-theme="dark"] .footer-social-note {
  color: #b5c2d6;
}
@media (max-width: 700px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
} 

/* --- ENHANCED FOOTER LOGO & NAV --- */
.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}
.footer-logo h3 {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 0px;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.footer-logo .highlight {
  color: #14b8a6;
  position: relative;
  padding-bottom: 2px;
}
.footer-logo .highlight::after {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #14b8a6 60%, #38bdf8 100%);
  border-radius: 2px;
  opacity: 0.18;
}
.footer-logo p {
  font-size: 1.08rem;
  color: #64748b;
  margin-top: 2px;
  margin-bottom: 0;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.theme-dark .footer-logo p,
[data-theme="dark"] .footer-logo p {
  color: #b5c2d6;
}

.footer-nav {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1.5px solid rgba(20,184,166,0.08);
}
.theme-dark .footer-nav,
[data-theme="dark"] .footer-nav {
  border-top: 1.5px solid rgba(56,189,248,0.10);
}
.footer-nav h4 {
  font-size: 1.13rem;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav ul li {
  margin-bottom: 8px;
}
.footer-nav ul li a {
  color: #64748b;
  text-decoration: none;
  font-size: 1.04rem;
  font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-bottom 0.2s;
}
.footer-nav ul li a:hover {
  color: #14b8a6;
  border-bottom: 2px solid #14b8a6;
}
.theme-dark .footer-nav ul li a,
[data-theme="dark"] .footer-nav ul li a {
  color: #b5c2d6;
}
.theme-dark .footer-nav ul li a:hover,
[data-theme="dark"] .footer-nav ul li a:hover {
  color: #38bdf8;
  border-bottom: 2px solid #38bdf8;
} 

/* --- PORTFOLIO FILTER BUTTONS DARK MODE --- */
.theme-dark .portfolio-filter .filter-btn {
  background: #23272f !important;
  color: #f8fafc !important;
  border: 1.5px solid #334155 !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(20,184,166,0.08);
}
.theme-dark .portfolio-filter .filter-btn.active {
  background: #14b8a6 !important;
  color: #fff !important;
  border-color: #14b8a6 !important;
  font-weight: 700 !important;
}
.theme-dark .portfolio-filter .filter-btn:hover,
.theme-dark .portfolio-filter .filter-btn:focus {
  background: #38bdf8 !important;
  color: #fff !important;
  border-color: #38bdf8 !important;
  font-weight: 700 !important;
} 

/* --- FORCE PORTFOLIO FILTER BUTTONS DARK MODE OVERRIDE --- */
.theme-dark .portfolio-filter .filter-btn,
.theme-dark .portfolio-filter button.filter-btn,
[data-theme="dark"] .portfolio-filter .filter-btn {
  background: #23272f !important;
  color: #f8fafc !important;
  border: 1.5px solid #38bdf8 !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(20,184,166,0.08);
}
.theme-dark .portfolio-filter .filter-btn.active,
.theme-dark .portfolio-filter button.filter-btn.active,
[data-theme="dark"] .portfolio-filter .filter-btn.active {
  background: #14b8a6 !important;
  color: #fff !important;
  border-color: #14b8a6 !important;
  font-weight: 700 !important;
}
.theme-dark .portfolio-filter .filter-btn:hover,
.theme-dark .portfolio-filter .filter-btn:focus,
[data-theme="dark"] .portfolio-filter .filter-btn:hover,
[data-theme="dark"] .portfolio-filter .filter-btn:focus {
  background: #38bdf8 !important;
  color: #fff !important;
  border-color: #38bdf8 !important;
  font-weight: 700 !important;
} 

body.theme-dark .skills-grid .skill,
[data-theme="dark"] .skills-grid .skill,
.theme-dark .skills-grid .skill {
  background: #23272a !important;
  color: #20cfcf !important;
  box-shadow: 0 2px 8px #20cfcf22 !important;
}
body.theme-dark .about-strengths,
[data-theme="dark"] .about-strengths,
.theme-dark .about-strengths {
  color: #20cfcf !important;
} 