/* Dark Theme (Default) */
:root {
  --bg-main: #0c0d10;
  --bg-card: #14161d;
  --bg-header: rgba(12, 13, 16, 0.85);
  --bg-input: #07080a;
  --accent: #d97706;
  --accent-hover: #f59e0b;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --border: #272a36;
  --logo-color: #ffffff;
  --success: #10b981;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Light Theme */
[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-header: rgba(248, 250, 252, 0.85);
  --bg-input: #f1f5f9;
  --accent: #d97706;
  --accent-hover: #b45309;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --logo-color: #0f172a;
  --success: #059669;
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  --card-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Navigation */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  border-bottom: 1px solid var(--border);
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: color 0.2 ease, transform 0.15 ease;
}

.logo:hover {
  color: var(--accent);
}

.logo:active {
  transform: scale(0.96);
}

nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

nav a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.theme-toggle-btn:hover {
  border-color: var(--accent);
}
/* Landscape Theme Button */
.landscape-toggle-btn {
  background: transparent;
  border: 2px solid var(--border);
  border-radius: 25px;
  padding: 0;
  width: 72px;
  height: 34px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: border-color 0.3s ease, transform 0.2s ease;
}

.landscape-toggle-btn:hover {
  border-color: var(--accent);
  transform: scale(1.04);
}

.landscape-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* --- DEFAULT (DARK MODE)  --- */
.sky-bg {
  fill: url(#sky-day);
  transition: fill 0.5s ease;
}

.stars {
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Sun is UP in Dark Mode */
.sun-body {
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

/* Moon is DOWN in Dark Mode */
.moon-body {
  transform: translateY(28px);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.mountain-back {
  fill: #64748b;
  transition: fill 0.5s ease;
}

.mountain-front {
  fill: #475569;
  transition: fill 0.5s ease;
}


/* --- LIGHT MODE --- */
[data-theme="light"] .sky-bg {
  fill: url(#sky-night);
}

[data-theme="light"] .stars {
  opacity: 1;
}

/* Sun sets down */
[data-theme="light"] .sun-body {
  transform: translateY(28px);
  opacity: 0;
}

/* Moon rises up */
[data-theme="light"] .moon-body {
  transform: translateY(0);
  opacity: 1;
}

[data-theme="light"] .moon-shadow {
  fill: #07090e;
}

[data-theme="light"] .mountain-back {
  fill: #1e293b;
}

[data-theme="light"] .mountain-front {
  fill: #0f172a;
}

/* Layout Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero Section */
.hero {
  padding: 4.5rem 0 2.5rem;
  text-align: center;
}

.hero h1 {
  font-size: 3.2rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

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

.hero p {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 680px;
  margin: 0 auto 2rem;
}

/* Embedded Tool Section */
.tool-section {
  padding: 1.5rem 0 4rem;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  width: 100%;
}

.tool-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.tool-header h2 {
  font-size: 1.75rem;
}

.tool-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.iframe-wrapper {
  width: 100%;
  height: 600px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: #0c0d10;
}

.iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Tech Stack Section */
.skills-section {
  padding: 3.5rem 0;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
}

.skill-category h3 {
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text-main);
}

/* Featured Projects Section */
.projects-section {
  padding: 3.5rem 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-card:hover {
  border-color: var(--accent);
}

.project-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.project-links a:hover {
  text-decoration: underline;
}

/* Contact Section */

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  max-width: 700px;
  margin: 0 auto;
}

.contact-card h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.btn {
  background: var(--accent);
  color: #ffffff;
  font-weight: 620;
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

/* Modal Overlay Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.modal-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
  text-align: left;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-group input,
.form-group textarea {
  width: 100%;
  max-width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  max-height: 200px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.submit-btn {
  width: 100%;
  margin-top: 0.5rem;
}

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

.form-status.success {
  color: var(--success);
}

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

/* About Modal Custom Styling */
.about-card {
  max-width: 650px;
  text-align: left;
  padding: 3rem;
  border-top: 4px solid var(--accent);
}

.about-header {
  margin-bottom: 2rem;
}

.about-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.about-line {
  width: 80px;
  height: 3px;
  border-radius: 2px;
}

.about-body h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

/* Name */
.about-body h3 span {
  color: var(--accent);
}

.about-body p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Footer & Social Links */
footer {
  border-top: 1px solid var(--border);
  background-color: var(--bg-card);
  padding: 2.5rem 1.5rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center; /* Keeps center links vertically aligned with left and right columns */
  gap: 2rem;
}

/* Left Column Styling */
.footer-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.2rem;
}

.copyright-main {
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
}

.copyright-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Center Column Styling */
.footer-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease, transform 0.2s ease;
}

/* Icon Sizing and Alignment */
.social-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.social-links a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

/* Right Column Styling */
.footer-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
}

.footer-right h2 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.footer-right p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}


/* 1. Global Box-Sizing & Overflow Safety */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden; /* Prevents unwanted horizontal scrolling */
}

/* 2. Tablet & Small Laptops (max-width: 820px) */
@media (max-width: 820px) {
  /* Footer Stacking */
  .footer-container {
    flex-direction: column-reverse;
    text-align: center;
    gap: 2rem;
  }

  .footer-left,
  .footer-right {
    align-items: center;
    text-align: center;
  }
}

/* 1. Global Box-Sizing & Overflow Safety */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden; /* Prevents unwanted horizontal scrolling */
}

/* 2. Tablet & Small Laptops (max-width: 820px) */
@media (max-width: 820px) {
  /* Footer Stacking */
  .footer-container {
    flex-direction: column-reverse;
    text-align: center;
    gap: 2rem;
  }

  .footer-left,
  .footer-right {
    align-items: center;
    text-align: center;
  }
}

/* 3. Standard Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
  /* Navbar Adjustments */
  nav, .nav-container {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .logo {
    font-size: 1.15rem;
  }

  .nav-links {
    gap: 0.75rem;
  }

  .nav-links a {
    font-size: 0.85rem;
  }

  /* Compact Landscape Theme Toggle on Mobile */
  .landscape-toggle-btn {
    width: 58px;
    height: 28px;
  }

  /* Hero Section */
  .hero h1 {
    font-size: 2.1rem;
    line-height: 1.25;
  }

  .hero p {
    font-size: 0.95rem;
    padding: 0 0.5rem;
  }

  /* Iframes & Cards */
  .iframe-wrapper {
    height: 480px;
    border-radius: 8px;
  }

  /* Modal Dialogs */
  .modal-card,
  .about-card {
    width: 92%;
    padding: 1.75rem 1.25rem;
  }

  .about-header h2 {
    font-size: 1.75rem;
  }

  .about-body h3 {
    font-size: 1.25rem;
  }
}

/* 4. Extra-Small Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
  /* Prevent Header Collisions */
  .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    font-size: 1rem;
    letter-spacing: -0.03em;
  }

  .nav-links {
    gap: 0.5rem;
  }

  .nav-links a {
    font-size: 0.8rem;
  }

  /* Compact Hero Typography */
  .hero h1 {
    font-size: 1.75rem;
  }

  /* Social Links Wrap cleanly */
  .social-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  /* Textarea mobile viewport constraint */
  .form-group textarea {
    min-height: 100px;
  }
}
/*Floation pill Scrollbar*/
/* Firefox Support */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Chrome, Edge, Safari & Opera */
::-webkit-scrollbar {
  width: 10px; /* Width of the scrollbar area */
}

::-webkit-scrollbar-track {
  background: transparent; /* Completely invisible track */
}

::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.22); /* Soft neutral gray thumb */
  border-radius: 99px; /* Fully rounded capsule shape */
  border: 2px solid transparent; /* Gives padding around the thumb */
  background-clip: padding-box; /* Creates the floating inset effect */
  transition: background-color 0.2s ease;
}

/* Hover State */
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.4); /* Brighter gray on hover */
  background-clip: padding-box;
}

/* --- Light Mode Adaptive Colors --- */
[data-theme="light"] ::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.25);
  background-clip: padding-box;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.45);
  background-clip: padding-box;
}

[data-theme="light"] * {
  scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
}
