@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Mono:wght@400;700&display=swap');

/* =============================================
   CSS VARIABLES — Spring Boot (default)
   Black bg + Violet accent (old design)
   ============================================= */
:root {
  --color-bg: #0f0f0f;
  --color-text: #ffffff;
  --color-border: #2a2a2a;
  --color-card-bg: #0f0f0f;
  --color-hover: #aaaaaa;

  /* Spring Boot — violet (original design) */
  --color-accent: #a78bfa;
  --color-accent-dark: #8b5cf6;
  --color-accent-light: #c4b5fd;

  --font-main: 'Inter', sans-serif;
  --font-mono: 'Space Mono', monospace;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   Flutter mode — deep teal / emerald palette
   Dark bg shifts slightly warmer/cooler
   ============================================= */
[data-mode="flutter"] {
  --color-bg: #0b1117;
  --color-border: #1a2a2e;
  --color-card-bg: #0e1a20;
  --color-hover: #8faab0;

  --color-accent: #2dd4bf;       /* teal-400 */
  --color-accent-dark: #0d9488;  /* teal-600 */
  --color-accent-light: #5eead4; /* teal-300 */
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-snap-type: y proximity;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.3s ease;
}

/* Flash overlay on mode switch */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--color-accent);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

body.switching::after {
  opacity: 0.03;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 4rem 0 8rem;
}

section {
  scroll-snap-align: start;
}

/* =============================================
   FLOATING MODE PILL
   ============================================= */
.mode-pill {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 100px;
  padding: 5px;
  gap: 2px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03);
  backdrop-filter: blur(16px);
  -webkit-tap-highlight-color: transparent;
}

.pill-btn {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border: none;
  background: transparent;
  color: #888;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 400;
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.25s ease;
  white-space: nowrap;
  min-width: 130px;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  outline: none;
}

.pill-btn:focus {
  outline: none;
}

.pill-btn:active {
  outline: none;
}

.pill-btn.active {
  color: #0a0a0a;
}

.pill-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  pointer-events: none;
}

.pill-slider {
  position: absolute;
  top: 5px;
  left: 5px;
  height: calc(100% - 10px);
  width: calc(50% - 3px);
  background: var(--color-accent);
  border-radius: 100px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.4s ease;
  z-index: 1;
  pointer-events: none;
}

[data-mode="flutter"] .pill-slider {
  transform: translateX(calc(100% + 2px));
}

/* =============================================
   SOCIAL SIDEBAR
   ============================================= */
.social-sidebar {
  position: fixed;
  left: 40px;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.social-sidebar a {
  color: var(--color-text);
  transition: var(--transition);
  opacity: 0.7;
}

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

.sidebar-line {
  width: 1px;
  height: 90px;
  background-color: var(--color-text);
  opacity: 0.3;
}

@media (max-width: 768px) {
  .social-sidebar { display: none; }
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: transparent;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

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

.nav-link::before {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: var(--transition);
}

.nav-link:hover::before,
.nav-link.active::before { width: 100%; }

.nav-link.active { color: var(--color-accent); }

@media (max-width: 768px) {
  .nav-container { padding: 1rem 1.5rem; }
  .nav-menu { gap: 1.2rem; }
  .nav-link { font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .nav-container { padding: 1rem; }
  .nav-menu { gap: 0.8rem; }
  .nav-link { font-size: 0.75rem; }
}

/* =============================================
   ABOUT SECTION
   ============================================= */
.about-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0;
}

.about-section .container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
}

.about-content {
  max-width: 700px;
  text-align: left;
  margin: 0;
}

.about-greeting {
  font-size: 1rem;
  font-family: var(--font-mono);
  color: var(--color-accent);
  margin-bottom: 1rem;
  font-weight: 400;
  transition: color 0.4s ease;
}

/* ==================================================
   NAME — same animated rainbow gradient both modes
   (original from old design)
   ================================================== */
.about-name {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 2rem;
  background: linear-gradient(
    90deg,
    #ffffff 0%,
    #a78bfa 15%,
    #c084fc 30%,
    #e879f9 45%,
    #f472b6 60%,
    #fb923c 75%,
    #fbbf24 90%,
    #a78bfa 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 5s ease infinite;
}
[data-mode="flutter"] .about-name {
  background: linear-gradient(
    90deg,
   #ffffff 0%,    /* white flash */
    #67e8f9 12%,   /* cyan */
    #22d3ee 24%,   /* electric cyan */
    #2dd4bf 36%,   /* teal */
    #10b981 48%,   /* emerald */
    #22c55e 60%,   /* green */
    #a3e635 72%,   /* lime */
    #fde047 84%,   /* yellow */
    #2dd4bf 100%   /* snap back */
  );
  background-size: 200% 100%;
    -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 5s ease infinite;
}

@keyframes gradientFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.about-description {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 3rem;
  color: var(--color-hover);
}

.about-description strong {
  color: var(--color-accent-light);
  font-weight: 600;
  transition: color 0.4s ease;
}

.about-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

@media (max-width: 768px) {
  .about-section { padding: 80px 0; min-height: 90vh; }
  .about-content { max-width: 100%; }
  .about-greeting { font-size: 0.9rem; }
  .about-name { font-size: clamp(2rem, 10vw, 3.5rem); margin-bottom: 1.5rem; }
  .about-description { font-size: 1rem; margin-bottom: 2rem; }
  .about-buttons { gap: 1rem; }
}

@media (max-width: 480px) {
  .about-section { padding: 60px 0; }
  .about-name { font-size: clamp(1.8rem, 12vw, 2.5rem); }
  .about-description { font-size: 0.95rem; }
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--color-accent);
  color: #0a0a0a;
  border-color: var(--color-accent);
  transition: background-color 0.4s ease, border-color 0.4s ease, color 0.25s ease;
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
  transition: background-color 0.4s ease, color 0.25s ease, border-color 0.4s ease;
}

.btn-secondary:hover {
  background-color: var(--color-accent);
  color: #0a0a0a;
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .btn { padding: 0.75rem 1.5rem; font-size: 0.9rem; }
  .btn-large { padding: 0.9rem 2rem; font-size: 0.95rem; }
}

@media (max-width: 480px) {
  .btn { padding: 0.7rem 1.3rem; font-size: 0.85rem; }
  .btn-large { padding: 0.85rem 1.8rem; font-size: 0.9rem; }
}

/* =============================================
   MODE CONTENT TRANSITIONS
   ============================================= */
.mode-content {
  transition: opacity 0.35s ease;
}

.mode-content.fading-in {
  animation: fadeUp 0.45s ease forwards;
}

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

/* =============================================
   TECHNOLOGIES SECTION
   ============================================= */
.technologies-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0;
  background-color: var(--color-bg);
  transition: background-color 0.4s ease;
}

.technologies-section .container { width: 100%; }

.tech-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 3rem;
}

.tech-accent {
  width: 60px;
  height: 4px;
  background-color: var(--color-accent);
  border-radius: 2px;
  transition: background-color 0.4s ease;
}

.tech-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-text);
}

.tech-subtitle {
  font-size: 1.1rem;
  color: var(--color-hover);
  margin-bottom: 3rem;
  max-width: 700px;
  line-height: 1.75;
}

.tech-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: flex-start;
  max-width: 700px;
}

/* BOTH Spring Boot AND Flutter tech cards — flat, no border, minimal */
.tech-card {
  background: transparent;
  border: none;
  padding: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.tech-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.tech-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.tech-card p {
  font-size: 1rem;
  color: var(--color-hover);
  line-height: 1.7;
}

.tech-card p strong {
  color: var(--color-text);
  font-weight: 500;
}

@media (max-width: 768px) {
  .technologies-section { padding: 80px 0; min-height: auto; }
  .tech-header { margin-bottom: 2rem; }
  .tech-accent { width: 40px; height: 3px; }
  .tech-header h2 { font-size: 2rem; }
  .tech-subtitle { font-size: 1rem; margin-bottom: 2rem; }
  .tech-grid { gap: 2rem; }
  .tech-card h3 { font-size: 1.1rem; }
  .tech-card p { font-size: 0.95rem; }
}

@media (max-width: 480px) {
  .technologies-section { padding: 60px 0; }
  .tech-header h2 { font-size: 1.75rem; }
  .tech-subtitle { font-size: 0.95rem; }
  .tech-card h3 { font-size: 1.05rem; }
  .tech-card p { font-size: 0.9rem; }
}

/* =============================================
   PROJECTS SECTION
   ============================================= */
.projects-section {
  padding: 100px 0;
  background-color: var(--color-bg);
  transition: background-color 0.4s ease;
}

.project-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 6rem;
  align-items: center;
}

.project-featured.reverse { direction: rtl; }
.project-featured.reverse > * { direction: ltr; }

.project-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 1rem;
  transition: color 0.4s ease;
}

.project-name {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.project-description {
  background-color: var(--color-card-bg);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
  position: relative;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

/* Flutter: accent top line on description card */
[data-mode="flutter"] .project-description::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  border-radius: 8px 8px 0 0;
  opacity: 0.6;
}

.project-description p {
  color: var(--color-hover);
  line-height: 1.7;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.project-tech span {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-accent-light);
  transition: color 0.4s ease;
}

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

.project-links a {
  color: var(--color-text);
  transition: var(--transition);
}

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

.project-image {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.4s ease;
  min-height: 260px;
  background: var(--color-card-bg);
}

[data-mode="flutter"] .project-image:hover {
  border-color: var(--color-accent);
  box-shadow: 0 0 30px rgba(45, 212, 191, 0.1);
}

.project-image img,
.project-image video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.placeholder-image {
  background: var(--color-card-bg);
  min-height: 260px;
}

.placeholder-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 260px;
  color: var(--color-accent);
}

.placeholder-inner span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-hover);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (max-width: 1024px) {
  .project-featured {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
  }
  .project-featured.reverse { direction: ltr; }
  .project-image { order: -1; }
}

@media (max-width: 768px) {
  .projects-section { padding: 80px 0; }
  .project-featured { margin-bottom: 3rem; }
  .project-label { font-size: 0.8rem; }
  .project-name { font-size: 1.6rem; margin-bottom: 1rem; }
  .project-description { padding: 1.5rem; margin-bottom: 1rem; }
  .project-description p { font-size: 0.95rem; }
  .project-tech { gap: 0.75rem; margin-bottom: 1rem; }
  .project-tech span { font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .projects-section { padding: 60px 0; }
  .project-name { font-size: 1.4rem; }
  .project-description { padding: 1.25rem; }
  .project-description p { font-size: 0.9rem; }
  .project-tech span { font-size: 0.75rem; }
}

/* =============================================
   CONTACT SECTION
   ============================================= */
.contact-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: 100px 0;
  background-color: var(--color-bg);
  transition: background-color 0.4s ease;
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-content h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.contact-description {
  font-size: 1rem;
  color: var(--color-hover);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.mobile-social-links {
  display: none;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.mobile-social-links a {
  color: var(--color-text);
  transition: var(--transition);
  opacity: 0.7;
}

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

@media (max-width: 768px) {
  .mobile-social-links { display: flex; }
  .contact-section { padding: 80px 0; min-height: 50vh; }
  .contact-content { max-width: 100%; }
  .contact-content h2 { font-size: 1.75rem; margin-bottom: 1rem; }
  .contact-description { font-size: 0.95rem; margin-bottom: 2rem; }
}

@media (max-width: 480px) {
  .contact-section { padding: 60px 0; min-height: 40vh; }
  .contact-content h2 { font-size: 1.5rem; }
  .contact-description { font-size: 0.9rem; }
}

/* =============================================
   RESPONSIVE CONTAINER
   ============================================= */
@media (max-width: 1024px) {
  .container { padding: 0 2rem; }
}

@media (max-width: 768px) {
  .container { padding: 0 1.5rem; }
  .mode-pill { bottom: 20px; }
  .pill-btn { 
    padding: 9px 14px; 
    font-size: 0.72rem; 
    gap: 5px;
    min-width: 110px;
  }
  .pill-btn svg { width: 12px; height: 12px; }
}


@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .pill-btn { 
    padding: 8px 12px; 
    font-size: 0.68rem; 
    gap: 4px;
    min-width: 95px;
  }
  .pill-btn svg { width: 11px; height: 11px; }
}

/* =============================================
   CUSTOM SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }

::selection { background-color: var(--color-accent); color: #0a0a0a; }
::-moz-selection { background-color: var(--color-accent); color: #0a0a0a; }

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.about-content {
  animation: fadeIn 0.8s ease-out;
}

@keyframes toastIn  { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(120%); opacity: 0; } }