/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500&family=Borel&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

/* SF Pro Display font import */
@font-face {
  font-family: 'SF Pro Display';
  src: url('https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-regular-webfont.woff');
}

/* Global Styles */
body {
  background-color: #000;
  margin: 0;
  padding: 0;
  width: 100%;
  position: relative;
  overflow-x: hidden;
  overflow-y: overlay;
  /* scrollbar for Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar for Webkit */
::-webkit-scrollbar {
  width: 4px;
  background-color: transparent;
}
::-webkit-scrollbar-track,
::-webkit-scrollbar-track-piece,
::-webkit-scrollbar-corner {
  background: transparent;
  border: none;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  border: none;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* App Container */
.App {
  min-height: 100vh;
  background-color: #000;
  color: white;
  font-family: 'EB Garamond', serif;
}
.App > section {
  position: relative;
}
.App > section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, transparent, #000);
  pointer-events: none;
  opacity: 0.5;
}

/* Header & Brand */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #f0f0f0 0%, #f0f0f0 100%);
  width: 0;
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 2px;
  will-change: width;
  pointer-events: none;
}

.header {
  position: fixed;
  top: 15px;
  left: 20px;
  z-index: 100;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.header.visible {
  opacity: 1;
  transform: translateY(0);
}
.header.hidden {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}
.brand-name {
  font-size: 24px;
  font-weight: 400;
  font-family: 'EB Garamond', serif;
  text-transform: lowercase;
  margin: 0;
  color: white;
}
.brand-name-link {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

/* Landing Section */
.landing-section {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
  position: relative;
}
.hello-text {
  font-family: 'Borel', cursive;
  font-size: 4rem;
  text-align: center;
  font-weight: 400;
  letter-spacing: -0.5px;
  position: absolute;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.hello-text.fade-in {
  opacity: 1;
  transform: translateY(0);
}
.hello-text.fade-out {
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.main-text {
  font-family: 'EB Garamond', serif;
  opacity: 0;
  font-size: 1.2rem;
  text-align: center;
  font-weight: 400;
  letter-spacing: 0.5px;
  line-height: 1.4;
  max-width: 600px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 20px;
  white-space: pre-wrap;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 1.4em;
}
.main-text.fade-in {
  opacity: 1;
  transform: translateX(-50%);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.cursor {
  display: inline-block;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}

/* Scroll Button (used on various sections) */
.scroll-button,
.about-scroll-button {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  font-family: 'EB Garamond', serif;
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
}
.scroll-button.visible,
.about-scroll-button.visible {
  opacity: 1;
}
.scroll-button:hover,
.about-scroll-button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}
/* Specific vertical positions */
.scroll-button { bottom: 40px; }
.about-scroll-button { bottom: 40px; }

/* Flip Button (Home Page) */
.flip-button-container {
  position: fixed;
  top: 20px;
  right: 40px;
  margin-right: 40px;
  z-index: 1000;
  perspective: 1000px;
  width: 300px;
  height: 40px;
}
.flip-button {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}
.flip-button-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}
.flip-button-container:hover .flip-button-inner {
  transform: rotateX(180deg);
}
.flip-button-front,
.flip-button-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 6px;
  font-family: 'EB Garamond', serif;
  font-size: 16px;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.flip-button-front {
  background: #000;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.flip-button-back {
  background: #fff;
  color: #000;
  transform: rotateX(180deg);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* About Section */
.about-section {
  padding: 80px 40px;
  max-width: 1200px;
  margin: 0 auto;
  color: white;
  background: #000;
}
.intro-section {
  margin-bottom: 120px;
}
.intro-text {
  font-size: 40px;
  line-height: 1.5;
  margin-bottom: 40px;
  max-width: 800px;
  color: #8c8c8c;
}
.section-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 10px;
  margin-bottom: 40px;
}
.section-header h2 {
  font-size: 20px;
  font-weight: normal;
  text-transform: lowercase;
}
.work-items {
  display: flex;
  flex-direction: column;
  gap: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 60px;
}
.work-item {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.work-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.work-info {
  flex: 1;
}
.work-type {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}
.company-name {
  font-size: 24px;
  margin: 10px 0;
  font-weight: normal;
}
.work-description {
  flex: 1;
  font-size: 18px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
}

/* Footer */
.footer {
  padding: 100px 40px;
  text-align: center;
  color: white;
  background: #000;
}
.footer-content {
  max-width: 800px;
  margin: 0 auto;
}
.footer-title {
  font-size: 40px;
  font-weight: normal;
  margin-bottom: 20px;
  line-height: 1.2;
}
.footer-subtitle {
  font-size: 20px;
  margin-bottom: 40px;
}
.footer-subtitle a{
  color: white;
}
.social-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 40px;
}
.social-icon {
  width: 24px;
  height: 24px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}
.social-icon:hover {
  opacity: 1;
}
.resume-button {
  height: 50px;
  width: 300px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 12px 40px;
  border-radius: 6px;
  font-family: 'EB Garamond', serif;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.resume-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Projects Section */
.projects-section {
  background-color: #FFF9E1;
  padding: 40px 40px;
  margin: 100px;
  border-radius: 12px;
  overflow: hidden;
}
.projects-section canvas {
  max-width: 1400px;
  margin: 0 auto;
}
.projects-container {
  /* background-color: #FFF9E1; */
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.projects-grid {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 3;
  pointer-events: none;
}
.projects-section .section-header {
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}
.projects-section .section-header h2 {
  font-size: 24px;
  margin: 0;
  line-height: 1.2;
  color: #000;
  padding-left: 15px;
}
.projects-items {
  display: grid;
  gap: 0rem;
}
.project-item {
  padding: 1.0rem 1.5rem;
  border-radius: 8px;
  pointer-events: none;
}
.project-info {
  margin-bottom: 1rem;
}
.project-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  margin: 0;
  color: #000;
}
.project-name a {
  color: #000;
  text-decoration: none;
  transition: color 0.3s ease;
  pointer-events: auto;
}
.project-name a:hover {
  color: #666;
}
.project-type,
.project-description {
  font-family: 'JetBrains Mono', monospace;
  color: #000;
}
.project-type {
  font-size: 0.9rem;
}
.project-description {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Common Button Styles */
.ripple-button {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  width: 300px;
  height: 50px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  font-family: 'EB Garamond', serif;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  z-index: 10;
}

.ripple-button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 600ms linear;
  background-color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Blog Button */
.blog-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 20px;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: white;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 1000;
  outline: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-button:hover {
  background-color: rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.blog-button:active {
  transform: translateY(0);
}

@media (min-width: 768px) {
  .blog-button {
    bottom: 40px;
    right: 40px;
    padding: 12px 24px;
  }
}

/* Brain Section */
.brain-section {
  min-height: 100vh;
  padding: 20px 2rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 0;
}

.footer-subtitle a {
  text-decoration: none;
  color: inherit; 
}

.footer-subtitle a:hover {
  text-decoration: underline;
}

/* Section Snap & Margin */
section {
  scroll-margin-top: 20px;
  scroll-snap-align: start;
}

/* --------------------- */
/*      Media Queries    */
/* --------------------- */
@media screen and (max-width: 768px) {
  /* General adjustments */
  .landing-section,
  .brain-section {
    height: 100svh;
    padding: 20px 1rem;
  }
  
  .header {
    padding: 1rem;
  }
  .brand-name {
    font-size: 1.2rem;
  }
  .cursor {
    font-size: 14px;
  }
  
  /* Text adjustments */
  .hello-text {
    font-size: 24px;
    margin-bottom: 15px;
  }
  .main-text {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    padding: 0 15px;
    width: 100%;
    max-width: 100%;
    text-align: center;
  }
  
  /* Scroll/Action Buttons */
  .scroll-button,
  .about-scroll-button {
    width: 80%;
    max-width: 280px;
    height: 45px;
    font-size: 0.9rem;
  }
  .scroll-button { bottom: 30px; }
  .about-scroll-button { bottom: 30px; }
  
  /* Flip Button adjustments */
  .flip-button-container {
    display: none; /* Hide on mobile */
  }
  
  /* About Section */
  .about-section {
    margin-top: 100px;
    padding: 40px 20px;
  }
  .intro-text {
    font-size: 18px;
  }
  .work-item {
    flex-direction: column;
    gap: 20px;
    padding-bottom: 30px;
  }
  .work-items {
    padding-bottom: 30px;
  }
  .work-description {
    font-size: 16px;
  }
  
  /* Footer adjustments */
  .footer {
    padding: 40px 15px;
  }
  .footer-title {
    font-size: 24px;
  }
  .footer-subtitle {
    font-size: 16px;
    color: white;
  }
  .social-links {
    gap: 15px;
    margin-bottom: 30px;
  }
  .resume-button {
    width: calc(100% - 30px);
    max-width: 280px;
    height: 45px;
  }
  
  /* Projects Section */
  .projects-section {
    margin: 25px;
    padding: 20px 0px;
  }
  .projects-items {
    gap: 1rem;
  }
  .project-name {
    font-size: 1rem;
  }

  .project-type {
    font-size: 0.75rem;
  }
  .project-description {
    font-size: 0.6rem;
  }
  .project-item {
    padding: .25rem 1.5rem;
    border-radius: 8px;
    pointer-events: none;
  }
  
  /* Ripple Button adjustments */
  .ripple-button {
    width: 80%;
    max-width: 280px;
    height: 45px;
    font-size: 0.9rem;
    bottom: 30px;
  }
}

/* Touch interactions (no hover) */
@media (hover: none) {
  .scroll-button:hover,
  .about-scroll-button:hover {
    background: rgba(255, 255, 255, 0.15);
  }
}