:root {
  --primary-color: #4f46e5; 
  --primary-hover: #4338ca;
  --primary-bg-subtle: #eef2ff;
  
  --bg-main: #ffffff;
  --bg-alt: #f8fafc;
  --card-bg: #ffffff;
  --input-bg: #f8fafc;

  --text-main: #1e293b;
  --text-body: #475569;
  --text-muted: #94a3b8;

  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08);

  --hero-gradient: radial-gradient(circle at top center, #eef2ff 0%, #ffffff 60%);
}

body.dark {
  --primary-color: #6366f1;
  --primary-hover: #818cf8;
  --primary-bg-subtle: rgba(99, 102, 241, 0.15);

  --bg-main: #0f172a;
  --bg-alt: #1e293b;
  --card-bg: #1e293b;       
  --input-bg: #020617;

  --text-main: #f1f5f9;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;

  --border-color: #334155;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5);

  --hero-gradient: radial-gradient(circle at top center, #1e1b4b 0%, #0f172a 60%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
  background: var(--bg-main);
  color: var(--text-body);
  line-height: 1.7;
  transition: background 0.3s ease, color 0.3s ease;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
  padding: 10px 0;
}

.header {
  background: var(--bg-main);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body.dark .header {
  background: rgba(15, 23, 42, 0.9);
}

.header.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--primary-color);
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 1.1rem;
}

.theme-toggle:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: var(--bg-alt);
}

.hero {
  padding-top: 180px;
  padding-bottom: 20px;
  text-align: center;
  background: var(--hero-gradient);
}

.hero h1 span {
  color: var(--primary-color);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 60px;
  align-items: center;
}

.hero-text {
  text-align: left;
}

.hero-name {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 5px;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 700;
}

.hero h1 {
  font-size: 2.8rem;
  color: var(--text-main);
  margin-bottom: 20px;
  line-height: 1.15;
}

.hero-usp {
  font-size: 1.1rem;
  max-width: 540px;
  color: var(--text-body);
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
}

.hero-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 15px;
}

.hero-image-wrapper {
  display: flex;
  justify-content: center;
}

.hero-image {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 20px 20px 0px var(--primary-bg-subtle);
  transition: transform 0.3s ease;
  border: 1px solid var(--border-color);
}

.hero-image:hover {
  transform: translateY(-5px);
}
/* icons */
.hero-socials {
  display: flex;
  gap: 20px;        
  margin-top: 25px;   
}

.hero-socials a {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.hero-socials a svg {
  width: 28px; 
  height: 28px;
}
.hero-socials a:hover {
  color: var(--primary-color); 
  transform: translateY(-3px);
}
@media (max-width: 992px) {
  .hero-socials {
    justify-content: center;
  }
}
.btn {
  display: inline-block;
  padding: 12px 32px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.btn.primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 6px rgba(79, 70, 229, 0.25);
}

.btn.primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 10px rgba(79, 70, 229, 0.3);
}

.btn.secondary {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn.secondary:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.section {
  padding: 100px 0;
}

.dark, #services, #projects, #contact {
  background: var(--bg-alt); 
}

#about {
  background: var(--bg-main);
  font-size: larger;
}

.section h2 {
  font-size: 2.2rem;
  color: var(--text-main);
  margin-bottom: 15px;
  font-weight: 700;
  position: relative;
}

.section p {
  color: var(--text-body);
}

.grid {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 40px;
}

.card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--text-muted);
}

.card h3 {
  color: var(--text-main);
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 35px 30px;
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-lg);
  border-bottom-color: var(--primary-color);
}

.service-header {
  display: flex;
  margin-bottom: 25px;
}

.service-icon {
  width: 55px;
  height: 55px;
  background: var(--bg-alt); 
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.service-icon svg {
  width: 28px;
  height: 28px;
}

.service-card:hover .service-icon {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: rotate(-5deg);
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
}

.service-card h3 {
  color: var(--text-main);
  margin-bottom: 12px;
  font-size: 1.25rem;
}

body.dark .service-icon {
  background: rgba(255, 255, 255, 0.03); 
  border-color: rgba(255, 255, 255, 0.1);
}

.experience-card {
  margin-bottom: 25px;
  padding: 30px;
  background: var(--bg-alt); 
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: border-color 0.2s;
}

body.dark .experience-card {
  background: var(--bg-main);
}

.experience-card:hover {
  border-color: var(--primary-color);
}

.experience-card h3 {
  color: var(--text-main);
}

.experience-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 600;
}
.experience-list {
  padding-left: 0;
  margin-left: 0;
  list-style-position: inside;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
  margin-top: 30px;
}

.skills-grid h3 {
  color: var(--text-main);
  margin-bottom: 15px;
}

.pill-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-list li {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.9rem;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.pill-list li:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.project-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  transition: transform 0.5s ease;
}

.card:hover .project-image {
  transform: scale(1.03);
}

.tech {
  margin-top: 15px;
  font-size: 0.85rem;
  color: var(--primary-color);
  font-family: monospace;
  background: var(--primary-bg-subtle);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
}

.education-card {
  background: var(--card-bg);
  padding: 35px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.education-card h3 {
  color: var(--text-main);
}

.education-card .muted {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 15px;
}
.graduation-year {
  margin-left: 60%;
}

.callToAction {
  background: var(--bg-alt);
  padding: 120px 0;
  text-align: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 50px;
  align-items: start;
}

.contact-details h2 {
  color: var(--text-main);
}

.contact-details ul {
  list-style: none;
  margin-top: 20px;
}

.contact-details li {
  margin-bottom: 12px;
  color: var(--text-body);
}

.contact-details strong {
  color: var(--text-main);
}

.contact-details a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.contact-form {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--text-main);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-main);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--card-bg);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 15px;
}

footer {
  text-align: center;
  padding: 40px;
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  margin-left: 15px;
}

.nav-toggle-line {
  background: var(--text-main);
  height: 2px;
  width: 24px;
  display: block;
  margin: 5px 0;
  transition: 0.3s;
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-text {
    text-align: center;
  }
  
  .hero-image-wrapper {
    order: -1;
    margin-bottom: 30px;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: block;
    margin-left: 15px; 
  }

  .nav {
    flex-wrap: wrap;
  }
  
  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    padding: 20px;
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    transition: 0.3s ease;
  }

  .nav-links.open {
    transform: scaleY(1);
    opacity: 1;
  }

  .nav-links ul {
    flex-direction: column;
    gap: 15px;
  }
}

.scroll-top {
  position: fixed;
  right: 25px;
  bottom: 25px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  background: var(--primary-color);
  color: white;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 1200;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
}