/* Global Styles */
:root {
  --font-family: 'Inter', sans-serif;
  --transition-speed: 0.3s ease;
  --base-bg: #0D0F17;
  --card-bg: rgba(28, 30, 41, 0.5);
  --text-primary: #F0F2F5;
  --text-secondary: #A8B2C0;
  --border-color: rgba(255, 255, 255, 0.1);
}

/* Theme Definitions */
.theme-royal-eclipse { --primary-color: #7548BC; --accent-color: #42275A; --glow-color: rgba(117, 72, 188, 0.2); }
.theme-dark-ember { --primary-color: #F1C2C8; --accent-color: #928DAB; --glow-color: rgba(241, 194, 200, 0.2); }
.theme-emerald-dusk { --primary-color: #A0D3D4; --accent-color: #2C5564; --glow-color: rgba(160, 211, 212, 0.25); }
.theme-venom-noir { --primary-color: #485565; --accent-color: #2d353d; --glow-color: rgba(72, 85, 101, 0.25); }
.theme-platinum-smoke { --primary-color: #9c9a91; --accent-color: #605C3C; --glow-color: rgba(140, 139, 131, 0.2); }
.theme-carbon-pulse { --primary-color: #9A8478; --accent-color: #453c38; --glow-color: rgba(154, 132, 120, 0.2); }

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--base-bg);
  color: var(--text-primary);
  transition: background-color var(--transition-speed), color var(--transition-speed);
  background-image: radial-gradient(at 50% 0%, var(--glow-color) 0px, transparent 50%);
  background-attachment: fixed;
}

#root, #app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  isolation: isolate;
  position: relative;
  overflow-x: hidden;
}

main {
    flex-grow: 1;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Keyframe Animations */
@keyframes floatAnimation {
    0% { transform: translate(0, 0); }
    50% { transform: translate(30px, -40px) scale(1.1); }
    100% { transform: translate(0, 0); }
}

@keyframes pulseAnimation {
    0% { transform: scale(1); box-shadow: 0 0 20px -5px var(--glow-color); }
    50% { transform: scale(1.03); box-shadow: 0 0 30px -2px var(--glow-color); }
    100% { transform: scale(1); box-shadow: 0 0 20px -5px var(--glow-color); }
}

@keyframes fadeInItem {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Glow Elements */
.glow-element-1, .glow-element-2 {
    position: absolute;
    z-index: -1;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.6;
}
.glow-element-1 {
    width: 500px;
    height: 500px;
    background: var(--primary-color);
    left: -200px;
    top: 100px;
    transition: background var(--transition-speed);
    animation: floatAnimation 18s ease-in-out infinite;
}
.glow-element-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-color);
    right: -150px;
    bottom: 0;
    transition: background var(--transition-speed);
    animation: floatAnimation 24s ease-in-out infinite 3s;
}

/* Theme Selector Modal */
.theme-selector-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: none; /* Hidden by default, controlled by JS */
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
  opacity: 0;
  animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn { to { opacity: 1; } }

.theme-selector-modal {
  background-color: rgba(13, 15, 23, 0.9);
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  text-align: center;
  width: 90%;
  max-width: 600px;
  transform: scale(0.95);
  animation: fadeIn 0.5s forwards, scaleUp 0.5s forwards;
}

@keyframes scaleUp { to { transform: scale(1); } }

.theme-selector-modal h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.theme-selector-modal p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

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

.theme-card {
  cursor: pointer;
  border-radius: 12px;
  padding: 1rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.theme-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px -5px var(--glow-color);
}

.theme-card h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.color-palette {
  height: 30px;
  border-radius: 8px;
  overflow: hidden;
}

.color-swatch {
  width: 100%;
  height: 100%;
}

/* Header */
.header {
  position: sticky;
  top: 1rem;
  width: calc(100% - 2rem);
  margin: 0 auto;
  z-index: 100;
  border-radius: 12px;
  background: rgba(13, 15, 23, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

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

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-speed);
  padding: 0.5rem;
}

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

.header-cta {
    background: #fff;
    color: #000;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform var(--transition-speed), filter var(--transition-speed);
}
.header-cta:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Hero Section */
.hero {
  padding: 8rem 0 6rem;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
}

.hero-headline {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  letter-spacing: -2px;
}

.gradient-text {
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: background var(--transition-speed);
}

.hero-subheadline {
  font-size: 1.25rem;
  max-width: 500px;
  margin-bottom: 2.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cta-button {
  background-color: var(--primary-color);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-speed);
  display: inline-block;
  border: 1px solid transparent;
  animation: pulseAnimation 2.5s ease-in-out infinite;
}

.cta-button:hover {
    filter: brightness(1.2);
}

/* Hero Visual Card */
.hero-visual-card {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 1rem;
    backdrop-filter: blur(10px);
    box-shadow: 0px 20px 40px rgba(0,0,0,0.3);
    position: relative;
}

.hero-visual-card .card-header {
    display: flex;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}
.card-header button.active {
    background: var(--text-primary);
    color: var(--base-bg);
}

.task-list {
    list-style: none;
    padding: 1rem 0.5rem;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0;
    animation: fadeInItem 0.6s ease-out forwards;
}
.task-item:last-child {
    border-bottom: none;
}
.task-item:nth-child(1) { animation-delay: 0.1s; }
.task-item:nth-child(2) { animation-delay: 0.2s; }
.task-item:nth-child(3) { animation-delay: 0.3s; }
.task-item:nth-child(4) { animation-delay: 0.4s; }
.task-item:nth-child(5) { animation-delay: 0.5s; }


.task-status {
    display: flex;
    align-items: center;
    width: 100px;
    flex-shrink: 0;
}

.task-status i {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 0.5rem;
    display: inline-block;
}

.icon-progress { background-color: #f5c518; border: 1px solid #fff; }
.icon-todo { border: 1px solid var(--text-secondary); }
.icon-done { background-color: #28a745; position: relative; }
.icon-done::after {
    content: '✓';
    color: #fff;
    font-size: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.task-text {
    color: var(--text-primary);
}


/* Projects Section */
.projects {
  padding: 6rem 0;
}

.section-title {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 4rem;
  letter-spacing: -1px;
}

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

.project-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.project-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: transform var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
  overflow: hidden;
  position: relative;
  height: 100%;
  cursor: pointer;
}
.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(400px circle at var(--x) var(--y), var(--glow-color), transparent 40%);
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
}
.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 0 40px -10px var(--glow-color);
}

.project-card .card-content {
    padding: 2rem;
    position: relative;
    z-index: 2;
    background: var(--card-bg);
    backdrop-filter: blur(5px);
    height: 100%;
}

.project-card h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.project-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.view-all-projects {
    text-align: center;
    margin-top: 4rem;
}

.view-all-button {
  background-color: transparent;
  color: var(--text-primary);
  padding: 1rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-speed);
  display: inline-block;
  border: 1px solid var(--border-color);
}

.view-all-button:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}


/* Works Page */
.works-page {
    padding: 6rem 0;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.work-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 40px -10px var(--glow-color);
}

.work-card h3 {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.work-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    flex-grow: 1;
}

.work-card-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.work-card-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all var(--transition-speed);
}

.work-card-links a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.technologies-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.tech-name {
    width: 100px;
    flex-shrink: 0;
    color: var(--text-primary);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
    transition: width var(--transition-speed);
}


/* Footer */
.footer {
  text-align: center;
  padding: 4rem 0;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: var(--base-bg);
}

.footer-text {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.socials {
    margin-bottom: 2rem;
}

.socials a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 1rem;
    font-weight: 500;
    transition: color var(--transition-speed);
}

.socials a:hover {
    color: var(--primary-color);
}

.copyright {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-subheadline {
      margin: 0 auto 2.5rem;
  }
  .hero-visual {
      margin-top: 4rem;
  }
}

@media (max-width: 768px) {
  .header {
    width: 100%;
    top: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .desktop-nav {
      display: none;
  }
  
  .logo {
      font-size: 1.25rem;
  }
  .hero-headline {
    font-size: 3rem;
  }
  .hero {
      padding: 4rem 0 4rem;
  }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    .theme-selector-modal { padding: 1.5rem; }
    .theme-grid { gap: 1rem; }
    .hero-headline { font-size: 2.5rem; }
    .projects { padding: 4rem 0; }
    .section-title { font-size: 2.5rem; }
    .work-grid { grid-template-columns: 1fr; }
}