/* --- Variables & Reset --- */
:root {
  --bg: #050505;
  --bg-alt: #0a0a0a;
  --text: #eaeaea;
  --text-dim: #888;
  --accent: #6366f1; /* Indigo */
  --accent-2: #ec4899; /* Pink */
  --accent-3: #06b6d4; /* Cyan */
  --border: rgba(255, 255, 255, 0.1);
  --font-main: 'Inter', sans-serif;
  --font-display: 'Syne', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: var(--text) var(--bg);
}

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

/* --- ANIMATED MESH GRADIENT BACKGROUND --- */
.gradient-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  background-color: var(--bg); /* Base color */
  overflow: hidden;
  /* This reduces brightness slightly so text pops */
  filter: brightness(0.9) contrast(1.1); 
}

.gradient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px); /* Heavy blur for glow effect */
  opacity: 0.6; /* Visibility */
  mix-blend-mode: screen; /* Colors mix when they overlap */
  will-change: transform;
}

/* Specific Blob Styles & Colors */
.blob-1 {
  width: 50vmax; height: 50vmax;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -20%; left: -10%;
}

.blob-2 {
  width: 60vmax; height: 60vmax;
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
  bottom: -30%; right: -20%;
}

.blob-3 {
  width: 40vmax; height: 40vmax;
  background: radial-gradient(circle, var(--accent-3) 0%, transparent 70%);
  top: 40%; left: 40%;
}

.blob-4 {
  width: 30vmax; height: 30vmax;
  background: radial-gradient(circle, #ffffff 0%, transparent 70%);
  top: 20%; right: 20%;
  opacity: 0.2; /* White subtle highlight */
}

/* --- Utils --- */
.container { max-width: 1400px; margin: 0 auto; padding: 0 4rem; }

/* --- Noise Overlay --- */
.noise {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --- Custom Cursor --- */
.cursor {
  position: fixed;
  width: 20px; height: 20px;
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width 0.3s ease, height 0.3s ease, background 0.3s ease, border-radius 0.3s ease;
}
.cursor.hover {
  width: 50px; height: 50px;
  background: white;
  border-radius: 50%;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  padding: 2rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  mix-blend-mode: difference;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: white;
  text-decoration: none;
  letter-spacing: 1px;
}
.magnetic-wrap { position: relative; display: inline-block; }
.magnetic-btn {
  position: relative;
  padding: 15px;
  background: transparent;
  border: none;
  color: white;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}
.magnetic-btn::before {
  content: '';
  width: 8px; height: 8px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

/* --- Overlay Menu --- */
.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(8,8,8, 0.98); /* Slight transparency */
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: circle(0% at calc(100% - 4rem) 3rem);
  transition: clip-path 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}
.overlay.open { clip-path: circle(150% at calc(100% - 4rem) 3rem); }
.overlay-menu a {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.3);
  text-decoration: none;
  margin: 1rem 0;
  text-align: center;
  transition: 0.3s;
}
.overlay-menu a:hover {
  color: white;
  -webkit-text-stroke: 0;
  transform: translateX(20px);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 6rem;
}
.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4rem;
  align-items: center;
}
.hero-greet {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.typed-wrap {
  font-size: 1.5rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
  height: 2.5rem;
}
.typed-wrap .highlight { color: var(--accent); }

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

/* Buttons */
.hero-btns { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.btn {
  padding: 1rem 2rem;
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s;
  background: transparent;
  cursor: pointer;
  border-radius: 2px;
}
.btn.primary { background: var(--text); color: var(--bg); border: none; }
.btn.outline-btn { border-color: var(--text); }
.btn:hover { background: var(--accent); color: white; border-color: var(--accent); }
.btn.small { padding: 0.75rem 1.5rem; font-size: 0.9rem; }

/* Portrait */
.hero-visual { display: flex; justify-content: center; position: relative; z-index: 1; }
.portrait-frame {
  width: 350px; height: 350px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 2px solid rgba(255,255,255,0.1);
  box-shadow: 0 0 80px rgba(99, 102, 241, 0.2); /* Stronger glow */
}
.portrait-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.4s;
}
.portrait-frame:hover img { filter: grayscale(0%); transform: scale(1.05); }
.portrait-placeholder {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: #111; display: none; align-items: center; justify-content: center; font-size: 5rem; color: #333;
}

/* --- Section Styles --- */
.section { padding: 8rem 0; position: relative; z-index: 1; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 4rem;
  text-transform: uppercase;
  display: inline-block;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 1rem;
}
.bg-darker { background: rgba(5,5,5, 0.8); backdrop-filter: blur(10px); } /* Slight blur to read over gradients */

/* --- About Grid --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}
.about-text p { color: var(--text-dim); font-size: 1.1rem; margin-bottom: 2rem; line-height: 1.8; }
.bullet-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.bullet-list li { display: flex; align-items: center; gap: 1rem; font-weight: 500; }
.bullet-list i { color: var(--accent); font-size: 0.5rem; }

.about-stats { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.stat-card { border-left: 3px solid var(--accent); padding: 1.5rem 2rem; background: rgba(255,255,255,0.02); backdrop-filter: blur(5px); border: 1px solid var(--border); }
.stat-num { display: block; font-family: var(--font-display); font-size: 3.5rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: 0.9rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-top: 0.5rem; display: block; }

/* --- Skills Grid --- */
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.skill-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  padding: 2.5rem 2rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(10px);
}
.skill-card:hover { background: rgba(255,255,255,0.08); transform: translateY(-10px); border-color: var(--accent); }
.skill-icon { font-size: 2.5rem; color: var(--accent); margin-bottom: 1.5rem; }
.skill-card h3 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 1rem; }
.skill-card p { color: var(--text-dim); margin-bottom: 1.5rem; font-size: 0.95rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tags span {
  font-size: 0.75rem; padding: 0.25rem 0.75rem;
  border: 1px solid var(--border); border-radius: 20px; color: var(--text);
}

/* --- Projects (Horizontal Scroll) --- */
.projects-section {
  padding-top: 10vh;
  position: relative;
}
.horizontal-scroll-wrapper {
  width: 100%;
  overflow: hidden;
}
.projects-container {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  padding-left: calc((100vw - 1400px) / 2 + 4rem);
}
.project-card {
  width: 80vw;
  max-width: 1200px;
  height: 80vh;
  margin-right: 5vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}
.project-content { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; align-items: center; height: 100%; }
.project-number { font-family: var(--font-display); font-size: 1rem; color: var(--accent); margin-bottom: 1rem; }
.project-info h3 { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.5rem); margin-bottom: 1.5rem; line-height: 1.1; }
.tech-badges { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.tech-badges span { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
.project-info p { color: var(--text-dim); margin-bottom: 2rem; max-width: 400px; }
.project-links { display: flex; gap: 1rem; }

.project-visual {
  width: 100%; height: 100%;
  background: #111; position: relative; overflow: hidden;
}
.project-visual img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(100%); opacity: 0.8; transition: all 0.5s ease;
}
.project-card:hover .project-visual img { filter: grayscale(0%); opacity: 1; transform: scale(1.05); }

/* --- Contact --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; }
.contact-info { display: flex; flex-direction: column; gap: 2.5rem; justify-content: center; }
.info-item { display: flex; align-items: center; gap: 1.5rem; font-size: 1.1rem; }
.info-item i { color: var(--accent); width: 20px; text-align: center; font-size: 1.2rem; }
.social-links { display: flex; gap: 2rem; margin-top: 1rem; }
.social-links a { color: var(--text); font-size: 1.5rem; transition: color 0.3s; }
.social-links a:hover { color: var(--accent); }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 2.5rem; }
.form-group { position: relative; }
.form-group input, .form-group textarea {
  width: 100%; background: transparent; border: none;
  border-bottom: 1px solid var(--border); padding: 1rem 0;
  color: var(--text); font-family: var(--font-main); font-size: 1rem;
  transition: border-color 0.3s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }

/* Footer */
.footer {
  text-align: center; padding: 4rem;
  color: var(--text-dim); font-size: 0.9rem;
  border-top: 1px solid var(--border);
}
.footer i { color: #ff4d4d; }

/* --- Responsive --- */
@media (max-width: 1200px) {
  .projects-container { padding-left: 4rem; }
}

@media (max-width: 900px) {
  .container { padding: 0 1.5rem; }
  .nav { padding: 1.5rem; }
  
  /* Layout Shifts */
  .hero-container { grid-template-columns: 1fr; text-align: center; }
  .hero-visual { order: -1; margin-bottom: 3rem; }
  .hero-desc, .typed-wrap { margin: 0 auto 2rem auto; }
  .hero-btns { justify-content: center; }
  .portrait-frame { width: 200px; height: 200px; }
  
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .skills-grid { grid-template-columns: 1fr 1fr; }

  /* Projects Mobile Fallback */
  .projects-container {
    flex-direction: column;
    width: 100%;
    padding: 0 1.5rem;
  }
  .project-card {
    width: 100%;
    height: auto;
    margin-right: 0;
    margin-bottom: 4rem;
    border-top: 1px solid var(--border);
  }
  .project-content { grid-template-columns: 1fr; gap: 2rem; }
  .project-visual { height: 250px; order: -1; }
  
  /* Hide cursor on touch devices */
  body { cursor: auto; }
  .cursor { display: none; }
}

@media (max-width: 600px) {
  .skills-grid { grid-template-columns: 1fr; }
  .section { padding: 5rem 0; }
}
