/* Base Styles */
:root {
  --primary-color: #4A6CF7;
  --secondary-color: #2EC5CE;
  --dark-color: #121212;
  --light-color: #f4f7ff;
  --text-color: #27272E;
  --text-light: #767676;
  --bg-color: #ffffff;
  --bg-secondary: #f8f9ff;
  --border-color: #e9ebf0;
  --success-color: #00c07f;
  --warning-color: #f7c32e;
  --error-color: #fc5757;
  --transition: all 0.3s ease;
  --shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  --font-primary: 'Roboto', sans-serif;
  --font-mono: 'Roboto Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

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

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

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

.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 36px;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.underline {
  height: 4px;
  width: 70px;
  background-color: var(--primary-color);
  margin: 0 auto;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 5px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #3a59d0;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(74, 108, 247, 0.3);
}

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

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

/* Navbar Styles */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: var(--bg-color);
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  height: 70px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo a {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  transition: var(--transition);
}

.logo a:hover {
  color: var(--secondary-color);
}

.menu-toggle {
  display: none;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  margin: 5px 0;
  transition: var(--transition);
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-menu li {
  margin-left: 30px;
}

.nav-link {
  color: var(--text-color);
  font-weight: 500;
  position: relative;
  padding: 5px 0;
}

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

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

.nav-link:hover::after {
  width: 100%;
}

.nav-terminal {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 8px 12px;
  border-radius: 5px;
  transition: var(--transition);
}

.nav-terminal:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--light-color) 100%);
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 15px;
  color: var(--dark-color);
}

.hero h2 {
  font-size: 28px;
  margin-bottom: 25px;
  color: var(--primary-color);
}

.hero p {
  font-size: 18px;
  margin-bottom: 40px;
  color: var(--text-light);
}

.hero-btns {
  display: flex;
  gap: 15px;
}

/* About Section */
.about-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 50px;
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-text p {
  margin-bottom: 20px;
  color: var(--text-light);
}

.about-image {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-photo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.photo-frame {
  width: 300px;
  height: 300px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.photo-frame:hover img {
  transform: scale(1.05);
}

.highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 30px;
}

.highlight-item {
  flex: 1;
  min-width: 200px;
  text-align: center;
  padding: 20px;
  border-radius: 10px;
  background-color: var(--bg-secondary);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.highlight-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.highlight-item i {
  font-size: 30px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.highlight-item h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

/* Research Section */
.research {
  background-color: var(--bg-secondary);
}

.research-item {
  display: flex;
  margin-bottom: 40px;
  padding: 30px;
  background-color: var(--bg-color);
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.research-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.research-icon {
  margin-right: 25px;
  flex-shrink: 0;
}

.research-icon i {
  font-size: 40px;
  color: var(--primary-color);
}

.research-details h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.research-details h4 {
  font-size: 16px;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 500;
}

.research-details p {
  color: var(--text-light);
}

/* Experience Section */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background-color: var(--primary-color);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}

.timeline-item {
  position: relative;
  margin-bottom: 50px;
  width: 50%;
  padding: 10px 40px;
}

.timeline-item:nth-child(odd) {
  left: 0;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--primary-color);
  border-radius: 50%;
  top: 20px;
  z-index: 1;
}

.timeline-item:nth-child(odd)::after {
  right: -10px;
}

.timeline-item:nth-child(even)::after {
  left: -10px;
}

.timeline-content {
  padding: 30px;
  background-color: var(--bg-color);
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.timeline-content h3 {
  font-size: 22px;
  margin-bottom: 5px;
}

.timeline-content h4 {
  font-size: 16px;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 500;
}

.timeline-date {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 15px;
}

.timeline-date i {
  margin-right: 5px;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.project-card {
  background-color: var(--bg-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.project-image {
  height: 150px;
  background-color: var(--bg-secondary);
  display: flex;
  justify-content: center;
  align-items: center;
}

.project-image i {
  font-size: 60px;
  color: var(--primary-color);
}

.project-content {
  padding: 25px;
}

.project-content h3 {
  font-size: 20px;
  margin-bottom: 15px;
}

.project-content p {
  color: var(--text-light);
  margin-bottom: 20px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-tags span {
  font-size: 12px;
  padding: 5px 10px;
  background-color: rgba(74, 108, 247, 0.1);
  color: var(--primary-color);
  border-radius: 20px;
}

.project-links {
  margin-top: 15px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.project-link:hover {
  background-color: #3a59d0;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(74, 108, 247, 0.3);
}

.project-link i {
  margin-right: 8px;
  font-size: 16px;
}

/* Life Offline Section */
.life-offline {
  background-color: var(--bg-secondary);
  overflow: hidden;
}

.life-offline-intro {
  max-width: 800px;
  margin: 0 auto 40px;
  text-align: center;
  color: var(--text-light);
  font-size: 18px;
}

.polaroid-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.polaroid {
  background-color: white;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  padding: 15px 15px 30px;
  transition: all 0.3s ease;
  transform: rotate(0deg);
  position: relative;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.polaroid:nth-child(odd) {
  transform: rotate(-2deg);
}

.polaroid:nth-child(even) {
  transform: rotate(2deg);
}

.polaroid:hover {
  transform: rotate(0deg) scale(1.03);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.polaroid-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
  background-color: #f5f5f5;
  margin-bottom: 15px;
  position: relative;
}

.polaroid-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
  max-width: 100%;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.polaroid:hover .polaroid-image img {
  transform: scale(1.05);
}

.polaroid-caption {
  text-align: center;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  color: var(--text-color);
}

.polaroid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 50%);
  pointer-events: none;
}

/* Fix for mobile polaroids */
@media (max-width: 768px) {
  .polaroid-gallery {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
  
  .polaroid {
    transform: rotate(0deg) !important; /* Force no rotation on mobile */
    margin-bottom: 20px;
    transition: transform 0.3s ease;
  }
  
  .polaroid:hover {
    transform: scale(1.03) !important;
  }
  
  .polaroid-image {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .polaroid-gallery {
    grid-template-columns: 1fr;
  }
  
  .polaroid {
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Skills Section */
.skills-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.skills-category {
  background-color: var(--bg-color);
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.skills-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.skills-category h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: var(--dark-color);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.skill-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.skill-name {
  font-size: 16px;
  font-weight: 500;
}

.skill-bar {
  height: 10px;
  background-color: var(--bg-secondary);
  border-radius: 5px;
  overflow: hidden;
}

.skill-level {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 5px;
}

/* Contact Section */
.contact {
  background-color: var(--bg-secondary);
}

.contact-content {
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
}

.contact-info {
  flex: 1;
  min-width: 300px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
}

.contact-item i {
  font-size: 24px;
  color: var(--primary-color);
  margin-right: 20px;
  margin-top: 5px;
}

.contact-item h3 {
  font-size: 18px;
  margin-bottom: 5px;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.social-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background-color: var(--bg-color);
  color: var(--primary-color);
  border-radius: 50%;
  transition: var(--transition);
}

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

.social-link i {
  font-size: 18px;
}

.contact-form {
  flex: 1;
  min-width: 300px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  outline: none;
  transition: var(--transition);
  font-family: var(--font-primary);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.1);
}

.form-group textarea {
  height: 150px;
  resize: none;
}

.form-messages {
  margin-top: 15px;
  padding: 10px;
  border-radius: 5px;
  display: none;
}

.form-messages.success {
  display: block;
  background-color: rgba(39, 201, 63, 0.1);
  color: var(--success-color);
  border: 1px solid var(--success-color);
}

.form-messages.error {
  display: block;
  background-color: rgba(252, 87, 87, 0.1);
  color: var(--error-color);
  border: 1px solid var(--error-color);
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: white;
  padding: 30px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 100;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: #3a59d0;
  transform: translateY(-3px);
}

/* Responsive Styles */
@media (max-width: 992px) {
  .navbar {
    padding: 0 20px;
  }
  
  .section {
    padding: 80px 0;
  }
  
  .hero h1 {
    font-size: 40px;
  }
  
  .hero h2 {
    font-size: 24px;
  }
  
  .timeline::after {
    left: 31px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  
  .timeline-item:nth-child(even) {
    left: 0;
  }
  
  .timeline-item::after {
    left: 21px;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    z-index: 1010;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background-color: var(--bg-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transition: 0.5s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-menu li {
    margin: 0;
  }
  
  .hero-content {
    text-align: center;
  }
  
  .hero-btns {
    justify-content: center;
  }
  
  .about-content, 
  .contact-content {
    flex-direction: column;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .section-header h2 {
    font-size: 30px;
  }
  
  .hero h1 {
    font-size: 32px;
  }
  
  .hero h2 {
    font-size: 20px;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.company-logo-box {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 60px;         /* circle size */
  height: 60px;
  border-radius: 50%;  /* circle shape */
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}


.company-logo-box img {
  max-width: 100%;   /* don’t fill the whole circle */
  max-height: 100%;  /* keeps space inside */
  object-fit: contain;
}


.timeline-content {
  position: relative;
  padding: 20px;
}


/* Physics Realm Section */
.physics-realm {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.physics-realm::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="70" cy="70" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="60" r="1" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
  animation: float 20s infinite linear;
}

@keyframes float {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-100px); }
}

.physics-realm .section-header h2 {
  color: white;
}

.physics-realm .underline {
  background: linear-gradient(45deg, #fff, #e0e7ff);
}

.realm-intro {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
  z-index: 1;
}

.realm-intro p {
  font-size: 1.2rem;
  line-height: 1.8;
  opacity: 0.9;
  max-width: 800px;
  margin: 0 auto;
}

.realm-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
  position: relative;
  z-index: 1;
}

.feature-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.feature-card:hover::before {
  left: 100%;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #FFD700;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: white;
}

.feature-card p {
  opacity: 0.9;
  line-height: 1.6;
}

.realm-cta {
  text-align: center;
  position: relative;
  z-index: 1;
}

.btn-large {
  padding: 18px 40px;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 50px;
  background: linear-gradient(45deg, #FFD700, #FFA500);
  color: #1a1a2e;
  border: none;
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-large:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(255, 215, 0, 0.4);
  color: #1a1a2e;
}

.btn-large i {
  margin-right: 10px;
  font-size: 1.1rem;
}

/* Responsive adjustments for Physics Realm */
@media (max-width: 768px) {
  .realm-features {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .feature-card {
    padding: 25px;
  }
  
  .feature-icon {
    font-size: 2.5rem;
  }
  
  .btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
  }
  
  .realm-intro p {
    font-size: 1.1rem;
  }
}

