/* --- CSS VARIABLES (THEMING ENGINE) --- */
:root {
  /* DARK MODE DEFAULT */
  --bg-core: #10002b;
  --text-main: #ffffff;
  --text-muted: #e0e0e0;
  --primary-accent: #ff9100;
  
  /* Glass Colors */
  --glass-bg: rgba(20, 0, 40, 0.4);
  --glass-border: rgba(255, 255, 255, 0.2);
  --header-glass: rgba(255, 255, 255, 0.05); 
  
  /* Shadows */
  --text-shadow: 0 4px 10px rgba(0,0,0,0.8);
  --box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  
  /* Orbs Colors */
  --orb-1: #9d4edd;
  --orb-2: #00b4d8;
  --orb-3: #ff6d00;
  --orb-opacity: 0.9;
  
  /* BUTTON VARIABLES (DARK MODE) */
  --btn-bg: rgba(255, 255, 255, 0.1);
  --btn-text: #ffffff; 
  --btn-border: rgba(255, 255, 255, 0.3);
  --btn-hover-text: #ffffff;
}

/* --- LIGHT MODE OVERRIDE  --- */
@media (prefers-color-scheme: light) {
  :root {
    /* LIGHT MODE SETTINGS */
    --bg-core: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --primary-accent: #4f46e5; 
    
    /* Glass Colors */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.6); 
    --header-glass: rgba(255, 255, 255, 0.3);
    
    --text-shadow: none;
    --box-shadow: 0 4px 20px rgba(148, 163, 184, 0.15);
    
    --orb-1: #c7d2fe;
    --orb-2: #ddd6fe;
    --orb-3: #bae6fd;
    --orb-opacity: 1;
    
    /* BUTTON VARIABLES  */
    --btn-bg: rgba(79, 70, 229, 0.1); 
    --btn-text: #4f46e5; 
    --btn-border: rgba(79, 70, 229, 0.3); 
    --btn-hover-text: #ffffff;
  }
}

/* --- GLOBAL RESET --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  background: transparent; 
  color: var(--text-main);
  text-align: center;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

/* --- BACKGROUND ANIMATION --- */
.background-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-core);
  z-index: -999;
  overflow: hidden;
  transition: background 0.5s ease;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px); 
  opacity: var(--orb-opacity);
  animation: floatOrb 15s infinite ease-in-out alternate;
}

.orb-1 { top: -10%; left: -10%; width: 70vw; height: 70vw; background: var(--orb-1); animation-duration: 20s; }
.orb-2 { bottom: -10%; right: -10%; width: 60vw; height: 60vw; background: var(--orb-2); animation-duration: 25s; animation-direction: alternate-reverse; }
.orb-3 { top: 50%; left: 50%; transform: translate(-50%, -50%); width: 50vw; height: 50vw; background: var(--orb-3); animation-duration: 18s; }

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 50px) scale(1.1); }
  100% { transform: translate(-20px, -30px) scale(0.9); }
}

/* --- HEADER (TOOLBAR) --- */
header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1100px;
  
  background: var(--header-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  
  border: 1px solid var(--glass-border);
  border-radius: 16px; 
  box-shadow: var(--box-shadow);
  
  z-index: 9999;
  padding: 12px 30px;
  
  animation: fadeInUp 0.8s ease-out forwards;
  transition: background 0.3s ease, border 0.3s ease;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo { display: flex; align-items: center; }
.logo img { height: 40px; width: auto; }

/* --- NAV LINKS --- */
.nav-links {
  list-style: none;
  display: flex;
  gap: 15px;
  margin: 0;
  padding: 0;
}
.nav-links li { display: block; }

.nav-links a {
  display: inline-block;
  background: var(--btn-bg);
  color: var(--text-main);
  padding: 10px 24px;
  border-radius: 16px; 
  border: 1px solid var(--glass-border); 
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  background: var(--primary-accent);
  border-color: var(--primary-accent);
  color: var(--btn-hover-text);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4); 
}

/* --- HERO --- */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  animation: fadeInUpStandard 0.8s ease-out 0.2s forwards;
  opacity: 0;
}

.hero h1 { font-size: 40px; margin-bottom: 10px; text-shadow: var(--text-shadow); font-weight: 800; color: var(--text-main); }
.hero p { font-size: 20px; opacity: 0.9; color: var(--text-main); text-shadow: var(--text-shadow); }

/* --- SECTIONS COMMON --- */
.about, .projects, .contact, .blog { padding: 80px 20px; }
.about h2, .projects h2, .contact h2, .blog h2 {
  margin-bottom: 30px;
  color: var(--primary-accent);
  text-shadow: var(--text-shadow);
  font-weight: 700;
  font-size: 2em;
}

.about-preview, .blog {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* --- BLOG STYLES --- */
.blog { opacity: 0; animation: fadeInUpStandard 0.8s ease-out 0.3s forwards; }
.blog h2 { max-width: 90%; margin-left: auto; margin-right: auto; }
.blog-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 25px; width: 90%; max-width: 1100px; margin: 0 auto; }

/* MODIFIED: BLOG CARD LEBAR FULL */
.blog-card {
  flex: 0 1 100%; /* Full Width */
  max-width: 100%; /* Full Width */
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--box-shadow);
  border-radius: 16px;
  padding: 30px;
  text-align: left;
  transition: transform 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;
}

.blog-card:hover { transform: translateY(-5px); border-color: var(--primary-accent); box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.blog-meta { font-size: 0.85em; color: var(--text-muted); margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }
.blog-card h3 { font-size: 1.5em; margin-bottom: 15px; color: var(--text-main); line-height: 1.3; }
.blog-card p { color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; font-size: 0.95em; }
.read-more-link { display: inline-flex; align-items: center; gap: 5px; color: var(--primary-accent); font-weight: 600; font-size: 0.9em; transition: gap 0.3s ease; }
.blog-card:hover .read-more-link { gap: 10px; }

/* --- PROJECTS --- */
.projects { opacity: 0; animation: fadeInUpStandard 0.8s ease-out 0.4s forwards; }
.project-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 25px; }

.project-card {
  flex: 0 1 350px;
  max-width: 350px;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--box-shadow);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  position: relative;
}

.project-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.15); border-color: var(--primary-accent); }
.project-card img { width: 100%; height: 200px; object-fit: cover; display: block; border-bottom: 1px solid var(--glass-border); }
.project-card h3 { background: transparent; color: var(--text-main); padding: 15px; margin: 0; font-size: 18px; font-weight: 600; }
.project-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(5px); display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s ease; padding: 20px; }
.project-card:hover .project-overlay { opacity: 1; }
.project-overlay p { color: #eee; font-size: 14px; margin-bottom: 20px; }

/* Main Button */
.project-link {
  display: inline-block;
  background: var(--btn-bg); 
  color: var(--btn-text);
  border: 1px solid var(--btn-border);
  padding: 10px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.project-link:hover {
  background: var(--primary-accent);
  border-color: var(--primary-accent);
  color: var(--btn-hover-text); 
  transform: translateY(-2px);
}

/* --- ABOUT PREVIEW (INDEX) & PROFILE CARD (PROFILE PAGE) --- */
.about-preview { opacity: 0; animation: fadeInUpStandard 0.8s ease-out 0.5s forwards; padding: 80px 20px; }

.about-card, .profile-card, .card {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--box-shadow);
  border-radius: 24px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

/* Specific styles for profile.html layout */
.profile-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid; 
  gap: 20px;
  animation: fadeInUpStandard 0.8s ease-out forwards;
}

.card { padding: 30px; text-align: left; }
.card:hover, .profile-card:hover, .about-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); border-color: var(--primary-accent); }

.profile-card { text-align: center; padding: 40px 30px; width: 100%; }
.card-header { display: flex; flex-direction: column; align-items: center; margin-bottom: 15px; }

.profile-image {
  border-radius: 50%; margin-bottom: 15px;
  width: 150px !important; height: 150px !important; object-fit: cover;
  border: 3px solid rgba(255,255,255, 0.9);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.profile-card p { color: var(--text-muted); font-weight: 500; letter-spacing: 0.5px; }
.card h2 {
  font-size: 1.4em; display: flex; align-items: center;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 8px; margin-bottom: 15px;
  color: var(--text-main); font-weight: 700;
}
.card h2 .material-icons { margin-right: 10px; color: var(--primary-accent); font-size: 1.2em; }
.card ul { list-style: none; padding-left: 0; }
.card ul li { margin-bottom: 8px; padding-left: 25px; position: relative; }
.card ul li::before {
  content: 'check_circle'; font-family: 'Material Icons';
  position: absolute; left: 0; color: var(--primary-accent);
  font-size: 18px; line-height: 1.6;
}

/* About Card on Index */
.about-card { width: 90%; max-width: 1100px; margin: 0 auto; padding: 50px; text-align: left; }
.about-info h3 { font-size: 2em; color: var(--text-main); margin-bottom: 5px; line-height: 1.2; }
.about-info .role { color: var(--primary-accent); font-weight: 600; font-size: 1.1em; margin-bottom: 20px; display: block; letter-spacing: 1px; }
.about-info p { color: var(--text-muted); margin-bottom: 25px; line-height: 1.7; font-size: 1.05em; }

/* BACK BUTTON */
.back-btn {
  display: inline-flex; align-items: center; gap: 8px; 
  background: var(--btn-bg); color: var(--text-main) !important;
  padding: 10px 20px; border-radius: 30px;
  border: 1px solid var(--glass-border);
  text-decoration: none; font-weight: 600;
  transition: all 0.3s ease; backdrop-filter: blur(5px);
  cursor: pointer;
}
.back-btn:hover {
  background: var(--primary-accent); border-color: var(--primary-accent);
  color: white !important;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
  transform: translateX(-3px);
}

/* TOOLBAR AREA (FOR SUB-PAGES) */
.toolbar-area {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    padding: 20px 30px; 
    margin-bottom: 0;
    position: relative;
    z-index: 50; 
}

/* --- CONTACT --- */
.contact {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  width: 90%;
  max-width: 1100px;
  margin: 40px auto; 
  border-radius: 20px;
  padding-bottom: 40px;
  opacity: 0;
  animation: fadeInUpStandard 0.8s ease-out 0.6s forwards;
  color: var(--text-main);
}
.contact a { color: var(--primary-accent); text-decoration: none; font-weight: bold; }

/* ANIMATIONS & CURSOR */
@keyframes fadeInUp { from { opacity: 0; transform: translate(-50%, 30px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes fadeInUpStandard { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.cursor { display: inline-block; margin-left: 2px; color: var(--primary-accent); animation: blink 0.7s infinite; font-weight: 700; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* --- SINGLE ARTICLE STYLES --- */
.article-container { padding: 40px 20px 60px; min-height: 100vh; display: flex; justify-content: center; }
.single-article-card { background: var(--glass-bg); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border: 1px solid var(--glass-border); box-shadow: var(--box-shadow); border-radius: 20px; padding: 40px; width: 100%; max-width: 800px; text-align: left; position: relative; overflow: hidden; animation: fadeInUpStandard 0.8s ease-out; }
.article-header { border-bottom: 1px solid var(--glass-border); padding-bottom: 20px; margin-bottom: 30px; text-align: center; }
.article-header h1 { font-size: 2em; color: var(--text-main); margin-bottom: 15px; line-height: 1.3; }
.article-meta { display: inline-flex; gap: 15px; font-size: 0.9em; color: var(--text-muted); background: rgba(0,0,0,0.1); padding: 5px 15px; border-radius: 20px; }
.article-content { color: var(--text-main); line-height: 1.8; font-size: 1.05em; }
.article-content h2, .article-content h3 { color: var(--primary-accent); margin-top: 30px; margin-bottom: 15px; }
.article-content p { margin-bottom: 20px; }
.highlight-box { background: var(--btn-bg); border-left: 4px solid var(--primary-accent); padding: 20px; border-radius: 8px; margin: 30px 0; font-style: italic; }

/* --- SPIN PAGE STYLES --- */
.spin-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding-bottom: 20px;
}

.spin-title {
    margin-bottom: 20px;
    font-size: 2.5rem;
    text-shadow: var(--text-shadow);
    text-align: center;
}

.spin-container {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
}

.spin-input-area {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--box-shadow);
    padding: 30px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 350px;
}

.spin-input-area label { color: var(--text-muted); font-weight: 500; }

.spin-input-area textarea {
    width: 100%;
    height: 180px;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-main);
    font-family: monospace;
    resize: vertical;
}

.spin-input-area textarea:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 10px rgba(var(--primary-accent), 0.2);
}

.spin-input-area button {
    padding: 12px 20px;
    background-color: var(--primary-accent);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.spin-input-area button:hover { transform: scale(1.05); box-shadow: 0 0 20px var(--primary-accent); }
.spin-input-area button:disabled { background-color: var(--text-muted); cursor: not-allowed; transform: none; }

.wheel-container {
    position: relative;
    width: 400px;
    height: 400px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
    margin-bottom: 50px;
}

.wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: transform 5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.wheel-pointer {
    position: absolute;
    top: -25px; 
    left: 50%;
    transform: translateX(-50%);
    width: 0; 
    height: 0; 
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-top: 50px solid #ff3d00;
    z-index: 10;
    filter: drop-shadow(0 4px 4px rgba(0,0,0,0.5));
}

/* RESPONSIVE */
@media screen and (max-width: 768px) {
  .nav-links { gap: 10px; }
  .nav-links a { padding: 8px 16px; font-size: 13px; }
  .project-card, .blog-card, .profile-card, .card, .spin-input-area { flex: 0 1 100%; }
  .about-card { padding: 30px 20px; }
  .profile-image { width: 120px; height: 120px; }
  .wheel-container { width: 300px; height: 300px; }
  .toolbar-area { padding: 15px 20px; }
}
@media screen and (max-width: 480px) {
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 16px; }
  header { width: 95%; top: 15px; padding: 10px 15px; }
  .nav-links { gap: 5px; }
  .nav-links a { padding: 6px 12px; font-size: 12px; }
}
