:root {
  --bg: #0f172a;
  --bg-offset: rgba(30, 41, 59, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-hover: #0ea5e9;
  --focus-ring: rgba(56, 189, 248, 0.3);
  --border: rgba(148, 163, 184, 0.1);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-mode {
  --bg: #f8fafc;
  --bg-offset: rgba(226, 232, 240, 0.6);
  --text-main: #0f172a;
  --text-muted: #475569;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --focus-ring: rgba(37, 99, 235, 0.2);
  --border: rgba(15, 23, 42, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  cursor: none; /* Custom cursor */
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text-muted);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

::selection {
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent);
}

/* Custom Cursor */
/* Point Circle Cursor */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  background-color: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 10000;
  transition: opacity 0.3s ease;
  will-change: transform;
}

/* Glow Background Cursor */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(29, 78, 216, 0.12) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: opacity 0.5s ease;
  will-change: transform;
}

body.light-mode .cursor-glow {
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 60%);
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
  background: var(--bg-offset);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: var(--transition);
  backdrop-filter: blur(8px);
}
.theme-toggle:hover {
  background: var(--focus-ring);
  color: var(--accent);
}
.theme-toggle .sun-icon { display: block; }
.theme-toggle .moon-icon { display: none; }

body.light-mode .theme-toggle .sun-icon { display: none; }
body.light-mode .theme-toggle .moon-icon { display: block; }

/* Layout */
.layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 4rem;
  min-height: 100vh;
}

@media (max-width: 1024px) {
  .layout {
    flex-direction: column;
    padding: 0 2rem;
    gap: 0;
  }
}

/* Left Sidebar Fixed */
.sidebar {
  width: 45%;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 6rem 0;
}

@media (max-width: 1024px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 6rem 0 4rem;
  }
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Typography & Hero */
.profile-img-container {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 2px solid var(--border);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
  background-color: var(--bg-offset);
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-name {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.hero-title {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

.hero-desc {
  max-width: 380px;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.hero-location {
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 500;
}

/* Navigation Menu */
.nav {
  margin-top: 4rem;
  flex-grow: 1;
}

@media (max-width: 1024px) {
  .nav {
    display: none; /* Hide sticky nav on mobile, users just scroll naturally */
  }
}

.nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nav a {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  width: fit-content;
  transition: var(--transition);
}

.nav-indicator {
  width: 2rem;
  height: 1px;
  background-color: var(--text-muted);
  transition: var(--transition);
}

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

.nav a:hover .nav-indicator, .nav a.active .nav-indicator {
  width: 4rem;
  background-color: var(--text-main);
}

/* Socials Links & Action Buttons */
.socials {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.social-icons-group {
  display: flex;
  gap: 1.5rem;
}

.social-link {
  color: var(--text-muted);
  transition: var(--transition);
}

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

.action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--text-main);
  color: var(--bg);
  padding: 0.6rem 1.25rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
  border: 1px solid var(--text-main);
}
.btn-primary:hover {
  background-color: transparent;
  color: var(--text-main);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: transparent;
  color: var(--text-main);
  padding: 0.6rem 1.25rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
}
.btn-outline:hover {
  border-color: var(--text-main);
}

/* Right Content Scrollable Area */
.content {
  width: 55%;
  padding: 6rem 0;
  display: flex;
  flex-direction: column;
  gap: 6rem;
}

@media (max-width: 1024px) {
  .content {
    width: 100%;
    padding: 0 0 6rem;
    gap: 4rem;
  }
}

/* Interactive States */
a:hover ~ #cursor-dot, button:hover ~ #cursor-dot {
  transform: translate(-50%, -50%) scale(1.5);
  background-color: transparent;
  border: 1.5px solid var(--accent);
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease-in-out, visibility 0.5s;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Quote Section */
.quote-container {
  font-family: 'Caveat', cursive;
  font-size: 2.5rem;
  color: var(--accent);
  opacity: 0.9;
  text-align: center;
  max-width: 80%;
}

.cursor-blink {
  animation: blink 1s step-end infinite;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  font-weight: 200;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Section Components */
.section {
  scroll-margin-top: 10rem;
  padding-bottom: 2rem;
}

.section-label {
  display: none; /* Only show on mobile */
}

@media (max-width: 1024px) {
  .section-label {
    display: block;
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(15, 23, 42, 0.9); /* Dark mode background */
    backdrop-filter: blur(8px);
    padding: 1rem 0;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    transition: var(--transition);
  }

  body.light-mode .section-label {
    background: rgba(248, 250, 252, 0.9); /* Light mode background */
  }
}

/* About Section Specifics */
.about-text p {
  margin-bottom: 1rem;
}

/* Skills Cloud (embedded in about/elsewhere) */
.skills-wrapper {
  margin-top: 2rem;
}

.skills-wrapper h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.skill-pill {
  display: inline-block;
  background: var(--bg-offset);
  color: var(--accent);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  margin: 0 0.5rem 0.5rem 0;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.skill-pill:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--focus-ring);
  transform: translateY(-2px);
}

/* Experience Cards */
.exp-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 3rem;
  padding: 1.5rem;
  border-radius: 0.5rem;
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.exp-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-offset);
  border-radius: 0.5rem;
  z-index: -1;
  opacity: 0;
  transition: var(--transition);
  border: 1px solid transparent;
}

.exp-card:hover::before {
  opacity: 1;
  border-color: var(--border);
}

@media (max-width: 640px) {
  .exp-card {
    padding: 1rem;
  }
  .exp-card:hover::before {
    opacity: 0;
  }
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.exp-duration {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.exp-header h3 {
  color: var(--text-main);
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.company-name {
  color: var(--text-muted);
  font-weight: 500;
}

.exp-role {
  color: var(--text-main);
}

.exp-category {
  font-size: 0.85rem;
  color: var(--text-main);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.exp-category:first-of-type {
  margin-top: 0.5rem;
}

.exp-bullets {
  list-style: none;
  font-size: 0.9rem;
}
.exp-bullets li {
  margin-bottom: 0.8rem;
  position: relative;
  padding-left: 1.25rem;
}
.exp-bullets li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Projects Cards */
.project-card {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
  padding: 1.5rem;
  border-radius: 0.5rem;
  transition: var(--transition);
  position: relative;
  z-index: 1;
  text-decoration: none;
  color: inherit;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-offset);
  border-radius: 0.5rem;
  z-index: -1;
  opacity: 0;
  transition: var(--transition);
  border: 1px solid transparent;
}

.project-card:hover::before {
  opacity: 1;
  border-color: var(--border);
}

@media (max-width: 640px) {
  .project-card {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 0.5rem;
  }
  .project-card:hover::before {
    opacity: 0;
  }
}

.project-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-offset);
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  overflow: hidden;
  transition: var(--transition);
}

.project-card:hover .project-img {
  background: rgba(56, 189, 248, 0.05); /* Slight accent tint on hover */
  border-color: var(--focus-ring);
}

.project-content h3 {
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

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

.project-desc {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

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

.project-tags .skill-pill {
  margin: 0;
  font-size: 0.7rem;
}

/* Footer CTA */
.footer-cta {
  display: none; /* Hidden on large screens */
}

@media (max-width: 1024px) {
  .footer-cta {
    padding: 4rem 0 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    border-top: 1px dashed var(--border);
    margin-top: 2rem;
  }
}

.footer-cta h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.025em;
  margin-bottom: -0.5rem;
}

.footer-cta p {
  max-width: 450px;
  font-size: 1.05rem;
  line-height: 1.6;
}

.footer-cta .action-buttons {
  justify-content: center;
  margin-top: 0.5rem;
}
