:root {
  --primary: #1a1a1a;
  --secondary: #4a4a4a;
  --accent: #f1684c;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --text: #1f2937;
  --text-light: #64748b;
  --white: #ffffff;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 30px 60px rgba(0, 0, 0, 0.1);
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Font Optimization */
@font-face {
  font-family: 'Font Awesome 6 Free';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/webfonts/fa-solid-900.woff2) format('woff2');
}

@font-face {
  font-family: 'Font Awesome 6 Brands';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/webfonts/fa-brands-400.woff2) format('woff2');
}

[data-theme="dark"] {
  --primary: #ffffff;
  --secondary: #cbd5e1;
  --accent: #2dd4bf;
  --bg: #0f172a;
  --bg-alt: #334155;
  --text: #f1f5f9;
  --text-light: #94a3b8;
  --white: #1e293b;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 30px 60px rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: radial-gradient(circle at top right, #fff7ed 0%, #ffffff 50%);
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

[data-theme="dark"] body {
  background: radial-gradient(circle at top right, #1e293b 0%, #0f172a 50%);
}

/* Navigation */
.nav {
  padding: 2rem 0;
  transition: var(--transition);
}

.nav.scrolled {
  padding: 1rem 0;
}

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

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -1px;
  font-family: 'Inter', sans-serif;
}

.logo-accent {
  color: var(--accent);
  font-weight: 400;
}

.theme-toggle {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: var(--bg-alt);
  transform: rotate(15deg);
}

/* Hero Section */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 6rem 0;
}

.hero-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-content {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s ease forwards 0.5s;
  will-change: transform, opacity;
  position: relative;
  z-index: 10;
}

.hero-title {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.title-line {
  display: block;
}

.highlight {
  color: var(--accent);
  position: relative;
  display: inline-block;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  max-width: 500px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  background: var(--accent);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
  border-color: var(--primary);
  background: var(--bg-alt);
}

/* Floating Elements Animation */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-circle, .floating-triangle {
  position: absolute;
  will-change: transform;
  filter: blur(100px); /* Increased blur significantly */
  opacity: 0.5;
}

.circle-1 {
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 104, 76, 0.08) 0%, rgba(241, 104, 76, 0) 60%);
  top: -200px;
  right: -150px;
  animation: float 25s infinite ease-in-out;
}

.circle-2 {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  /* Changed to warm accent color instead of gray to avoid "dirty" look */
  background: radial-gradient(circle, rgba(241, 104, 76, 0.05) 0%, rgba(241, 104, 76, 0) 60%);
  bottom: -100px;
  left: -150px;
  animation: float 20s infinite ease-in-out reverse;
}

.circle-3 {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 104, 76, 0.06) 0%, rgba(241, 104, 76, 0) 60%);
  top: 30%;
  right: 5%;
  left: auto;
  animation: float 18s infinite ease-in-out 1s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -50px) rotate(10deg); }
  66% { transform: translate(-20px, 20px) rotate(-5deg); }
}

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

/* Hero Image Animation - Architecture Stack */
.hero-image {
  position: relative;
  height: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
  z-index: 10;
}

.architecture-stack {
  position: relative;
  width: 220px;
  height: 220px;
  transform-style: preserve-3d;
  transform: rotateX(50deg) rotateZ(-30deg);
  transition: transform 0.5s ease;
}

/* Floor Shadow */
.architecture-stack::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.15);
  transform: translateZ(-100px);
  filter: blur(40px);
  border-radius: 30px;
  opacity: 1;
  transition: var(--transition);
  pointer-events: none;
}

[data-theme="dark"] .architecture-stack::before {
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
}

.hero-image:hover .architecture-stack {
  transform: rotateX(60deg) rotateZ(-45deg);
}

.arch-layer {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--white);
  border: 2px solid var(--accent);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transform-style: preserve-3d;
  
  /* Grid Pattern (Brick-like) */
  background-image: 
    linear-gradient(var(--bg-alt) 2px, transparent 2px),
    linear-gradient(90deg, var(--bg-alt) 2px, transparent 2px);
  background-size: 44px 44px; /* Creates a 5x5 grid on 220px */
  background-position: -1px -1px;
}

/* Dark Mode Aesthetic */
[data-theme="dark"] .arch-layer {
  /* Glassy dark surface */
  background-color: rgba(15, 23, 42, 0.8); 
  border-color: var(--accent);
  /* Neon Grid */
  background-image: 
    linear-gradient(rgba(45, 212, 191, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.3) 1px, transparent 1px);
  /* Neon Glow */
  box-shadow: 
    0 0 20px rgba(45, 212, 191, 0.15),
    inset 0 0 30px rgba(45, 212, 191, 0.05);
}

/* Layer Thickness (Sides) */
.arch-layer::after {
  content: '';
  position: absolute;
  right: -20px;
  bottom: 0;
  width: 20px;
  height: 100%;
  background: #e2e8f0; /* Light gray for realistic shading */
  transform-origin: left;
  transform: rotateY(90deg);
  border: 1px solid var(--accent);
  border-left: none;
}

.arch-layer::before {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 100%;
  height: 20px;
  background: #cbd5e1; /* Slightly darker for depth */
  transform-origin: top;
  transform: rotateX(-90deg);
  border: 1px solid var(--accent);
  border-top: none;
}

/* Dark Mode Sides - Cyberpunk Style */
[data-theme="dark"] .arch-layer::after {
  background: linear-gradient(to right, rgba(45, 212, 191, 0.4), rgba(15, 23, 42, 0.9));
  border-color: var(--accent);
  box-shadow: 5px 0 15px rgba(45, 212, 191, 0.1);
}

[data-theme="dark"] .arch-layer::before {
  background: linear-gradient(to bottom, rgba(45, 212, 191, 0.4), rgba(15, 23, 42, 0.9));
  border-color: var(--accent);
  box-shadow: 0 5px 15px rgba(45, 212, 191, 0.1);
}

/* Animation */
.layer-1 {
  animation: float-stack-1 6s ease-in-out infinite;
}

.layer-2 {
  animation: float-stack-2 6s ease-in-out infinite;
}

.layer-3 {
  animation: float-stack-3 6s ease-in-out infinite;
}

@keyframes float-stack-1 {
  0%, 100% { transform: translateZ(0px) rotateZ(0deg); }
  50% { transform: translateZ(20px) rotateZ(2deg); }
}

@keyframes float-stack-2 {
  0%, 100% { transform: translateZ(60px) rotateZ(0deg) translateX(0px); }
  50% { transform: translateZ(100px) rotateZ(-4deg) translateX(5px); }
}

@keyframes float-stack-3 {
  0%, 100% { transform: translateZ(120px) rotateZ(0deg) translateY(0px); }
  50% { transform: translateZ(180px) rotateZ(6deg) translateY(-5px); }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.5;
}

.scroll-mouse {
  width: 30px;
  height: 50px;
  border: 2px solid var(--primary);
  border-radius: 15px;
  position: relative;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background: var(--primary);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll 1.5s infinite;
}

@keyframes scroll {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, 20px); opacity: 0; }
}

/* Sections General */
section {
  padding: 4rem 0;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
}

/* About Section */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.about-text p {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--secondary);
}

.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}

.image-frame {
  width: 100%;
  height: 400px;
  background: var(--bg-alt);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.profile-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 4rem;
  color: var(--text-light);
  background: #e2e8f0;
}

/* Skills Section */
.skills {
  background: var(--bg-alt);
}

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

.skill-category {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.skill-category:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.category-title {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--bg-alt);
}

.skill-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.1rem;
  color: var(--secondary);
}

.skill-item i {
  font-size: 1.5rem;
  color: var(--accent);
  width: 30px;
}

/* Hero Skills & Social */
.hero-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.skill-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--white);
  border: 1px solid var(--bg-alt);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--secondary);
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  transition: var(--transition);
}

.skill-tag:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
}

.skill-tag i {
  color: var(--accent);
}

.hero-social {
  display: flex;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.social-icon {
  font-size: 1.5rem;
  color: var(--text-light);
  transition: var(--transition);
}

.social-icon:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

/* Social Section */
.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  background: var(--white);
  border-radius: 50px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.social-link:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  background: var(--primary);
  color: var(--white);
}

/* Contact Section */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 0;
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.contact-info {
  background: var(--primary);
  color: var(--white);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.contact-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
}

.shape-1 {
  width: 150px;
  height: 150px;
  background: var(--accent);
  top: -50px;
  right: -50px;
  animation: float-shape 10s infinite ease-in-out;
}

.shape-2 {
  width: 100px;
  height: 100px;
  border: 2px solid var(--accent);
  bottom: 50px;
  left: -30px;
  animation: float-shape 15s infinite ease-in-out reverse;
}

@keyframes float-shape {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, 20px); }
}

[data-theme="dark"] .contact-info {
  background: #0b1120;
  color: var(--text);
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.contact-info p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.contact-item i {
  width: 35px;
  height: 35px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--accent);
  font-size: 0.9rem;
}

.contact-form {
  padding: 3rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  color: var(--secondary);
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid var(--bg-alt);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
  background: transparent;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
  background: #0f172a;
  border-color: #334155;
  color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-alt);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
  background: #0f172a;
  border-color: var(--accent);
}

.btn-submit {
  width: 100%;
  justify-content: center;
  margin-top: 1rem;
}

.btn-submit:hover i {
  transform: translateX(5px) translateY(-5px);
}

/* Contact Social Links */
.contact-social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: auto;
}

.social-icon-link {
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.social-icon-link:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

/* Footer */
.footer {
  background: transparent;
  padding: 2rem 0;
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 968px) {
  .hero-container,
  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-image {
    height: 300px;
    order: -1;
  }

  .image-placeholder {
    width: 250px;
    height: 250px;
  }

  /* Reduce floating elements size on mobile */
  .circle-1 {
    width: 150px;
    height: 150px;
    top: -20px;
    right: -20px;
  }

  .circle-2 {
    width: 80px;
    height: 80px;
  }

  .circle-3 {
    width: 30px;
    height: 30px;
  }

  .contact-info {
    padding: 2rem;
  }

  .contact-form {
    padding: 2rem;
  }
}
