:root {
  /* Light Theme */
  --bg-color: #fcfcfc;
  --text-main: #1a1a1a;
  --text-muted: #666666;
  --accent: #2563eb;
  --nav-bg: rgba(252, 252, 252, 0.85);
  --nav-border: rgba(0, 0, 0, 0.08);
  --card-bg: #fff;
  --btn-bg: #1a1a1a;
  --btn-text: #ffffff;
  --btn-hover: #333333;
  --btn-sec-bg: transparent;
  --btn-sec-text: #1a1a1a;
  --btn-sec-border: #e5e5e5;
  --btn-sec-hover: #f5f5f5;
}

[data-theme="dark"] {
  /* Dark Theme */
  --bg-color: #0d0d0d;
  --text-main: #f2f2f2;
  --text-muted: #a1a1aa;
  --accent: #60a5fa;
  --nav-bg: rgba(13, 13, 13, 0.85);
  --nav-border: rgba(255, 255, 255, 0.08);
  --card-bg: #161616;
  --btn-bg: #f2f2f2;
  --btn-text: #0d0d0d;
  --btn-hover: #d4d4d4;
  --btn-sec-bg: transparent;
  --btn-sec-text: #f2f2f2;
  --btn-sec-border: #333333;
  --btn-sec-hover: #1a1a1a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Outfit", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  transition:
    background-color 0.4s ease,
    color 0.4s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nav-border);
  z-index: 1000;
  transition:
    background 0.4s ease,
    border-color 0.4s ease,
    padding 0.3s ease;
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: var(--text-main);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-main);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 50%;
  transition:
    background-color 0.3s ease,
    transform 0.3s ease;
}

.theme-toggle:hover {
  background-color: var(--nav-border);
  transform: scale(1.05);
}

.theme-toggle svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.5rem;
}

/* Main Content (Hero) */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero {
  max-width: 1200px;
  padding: 1.2rem 2rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  text-align: left;
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(30px);
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-image-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-image {
  width: 100%;
  max-width: 400px;
  height: 400px;
  object-fit: cover;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 4px solid var(--btn-sec-border);
  animation: blob-morph 12s ease-in-out infinite;
  transition:
    transform 0.4s ease,
    border-color 0.4s ease;
}

.hero-image:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--accent);
}

@keyframes blob-morph {
  0%,
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  33% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
  66% {
    border-radius: 73% 27% 41% 59% / 40% 58% 42% 50%;
  }
}

.hero-subtitle {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: block;
}

.hero-title {
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1.5px;
  color: var(--text-main);
}

.hero-desc {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 650px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
}

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

.btn-primary:hover {
  background-color: var(--btn-hover);
  border-color: var(--btn-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-primary svg {
  transition: transform 0.3s ease;
}

.btn-primary:hover svg {
  transform: translateX(5px);
}

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

.btn-secondary:hover {
  background-color: var(--btn-sec-hover);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

/* Footer */
footer {
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--nav-border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.socials {
  display: flex;
  gap: 1.25rem;
}

.socials a {
  color: var(--text-muted);
  transition:
    color 0.3s ease,
    transform 0.3s ease;
  display: flex;
}

.socials a:hover {
  color: var(--text-main);
  transform: translateY(-2px);
}

/* Page Shared Layout */
.page-main {
  padding: 1rem 0;
}

.page-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(30px);
}

.page-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 3rem;
  letter-spacing: -1px;
}

.section-heading {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
  position: relative;
  display: inline-block;
}

.section-heading.mt-2 {
  margin-top: 2rem;
}

.section-text {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.text-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.text-link:hover {
  color: var(--text-main);
  text-decoration: underline;
}

/* About Page Specific Layout */
.about-grid {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
}

.about-image-col {
  flex: 0 0 35%;
  position: sticky;
  top: 8rem;
}

.about-text-col {
  flex: 1;
}

.image-stack {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
}

.stack-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 4px solid var(--btn-sec-border);
  transition: transform 0.3s ease;
}

.stack-img:hover {
  transform: scale(1.02);
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.exp-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background-color: var(--nav-bg);
  border: 1px solid var(--nav-border);
  border-radius: 12px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.exp-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-color: var(--nav-border);
}

.exp-year {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
  white-space: nowrap;
}

.exp-details h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  margin-top: -0.3rem;
  color: var(--text-main);
}

.exp-details p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Projects Page Layout */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 1rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--nav-border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease,
    border-color 0.4s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
}

.project-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
}

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

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

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

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

.overlay-btn {
  background: var(--bg-color);
  color: var(--text-main);
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transform: translateY(20px);
  transition:
    transform 0.3s ease,
    background 0.3s ease,
    color 0.3s ease;
  text-decoration: none;
}

.project-card:hover .overlay-btn {
  transform: translateY(0);
}

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

.project-status-overlay {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-weight: 600;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  display: inline-block;
}

.project-card:hover .project-status-overlay {
  transform: translateY(0);
}

.project-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--text-main);
  line-height: 1.3;
}

.project-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.tag {
  background: var(--btn-sec-border);
  border: 1px solid var(--nav-border);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
}

/* Carousel */
.carousel {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 300px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  border: 1px solid var(--nav-border);
}

.carousel-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px;
  border-radius: 50px;
  backdrop-filter: blur(10px);
}

.carousel-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Resume Layout */
.resume-container {
  width: 100%;
  aspect-ratio: 8.5/11;
  max-width: 800px;
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
  border-radius: 20px;
  overflow: hidden;
  margin: 0 auto 1.5rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.resume-frame {
  width: 100%;
  height: 100%;
  border: none;
}

.updated-note {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Contact Layout */
.contact-page .page-title {
  margin-bottom: 0;
}

.contact-page .section-text {
  margin-bottom: 3rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: flex-start;
}

.contact-info {
  display: flex;
  flex-direction: column;
}

.info-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
  border-radius: 16px;
  text-decoration: none;
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.text-link-card.info-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
}

.text-link-card.info-item:hover .info-icon {
  background: var(--accent);
  color: #fff;
}

.info-icon {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: var(--btn-sec-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

.info-details h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: var(--text-main);
}

.info-details p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--nav-border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  text-align: left;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--nav-border);
  background: var(--bg-color);
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.w-100 {
  width: 100%;
  justify-content: center;
}

.form-status {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
}

.form-status.success {
  color: #10b981;
}

.form-status.error {
  color: #ef4444;
}

/* Animations */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 992px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    gap: 3rem;
    padding-block: 4rem;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-actions {
    align-items: center;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .navbar .nav-container {
    padding: 1rem 5%;
  }

  .nav-links {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(252, 252, 252, 1);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    border: none;
    gap: 2.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 900;
  }

  [data-theme="dark"] .nav-links {
    background: rgba(13, 13, 13, 1);
  }

  .nav-links.active {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    font-size: 2rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--text-muted);
    transition:
      color 0.3s ease,
      transform 0.3s ease;
  }

  .nav-links a:hover,
  .nav-links a.active {
    color: var(--text-main);
    transform: translateX(10px);
  }

  .mobile-toggle {
    display: block;
    z-index: 999;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-desc {
    font-size: 1.1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-image {
    max-width: 250px;
    height: 250px;
  }

  footer {
    flex-direction: column-reverse;
    gap: 1.5rem;
    text-align: center;
  }

  .about-grid {
    flex-direction: column;
    gap: 2rem;
  }

  .about-image-col {
    position: static;
    max-width: 400px;
    margin: 0 auto;
  }

  .exp-item {
    flex-direction: column;
    gap: 0.5rem;
  }

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