/* Contact Form Styles */
.contact-form {
  max-width: 800px;
  margin: 3rem 0;
  padding: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.5rem;
  font-family: var(--font-sans);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: #ffffff;
  border: 1px solid #000000;
  border-radius: 8px;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.4;
  transition: all 0.3s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(80, 0, 255, 0.1);
}

.form-group select {
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23000" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  padding-right: 3rem;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group textarea::placeholder {
  color: #999;
  font-style: italic;
}

.contact-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 400;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
  margin-top: 2rem;
}

.contact-submit-btn:hover {
  transform: scale(1.02);
}

.contact-submit-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(80, 0, 255, 0.3);
}

/* Mobile Contact Form */
@media (max-width: 768px) {
  .contact-form {
    margin: 2rem 0;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 0.9rem;
    font-size: 1rem;
  }
  
  .contact-submit-btn {
    width: 100%;
    padding: 1rem;
  }
}

/* At the very top of your styles.css */
html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* ScrollSmoother Setup */
#smooth-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
}

#smooth-content {
  overflow: visible;
  width: 100%;
  position: relative;
}

/* Ensure all content is contained within smooth-content */
#smooth-content > div {
  position: relative;
}

/* Fallback for no JavaScript */
html.no-js .fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: none;
}

html.no-js .floating-menu-btn {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* CSS-only animation fallback for .line */
.line-wrapper {
  opacity: 1 !important;
  /* Ensure the wrapper is visible */
}

.line {
  animation: slideIn 1.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes slideIn {
  from {
    transform: translateY(120%);
    opacity: 0;
  }

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

@keyframes quickFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Font Loading Optimization */
.fonts-loading {
  visibility: hidden;
}

.fonts-loaded {
  visibility: visible;
}

/* Critical text should always be visible */
h1, .page-title, .project-title {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  visibility: visible !important; /* Always show headlines */
}

/* Font Face Declarations */
@font-face {
  font-family: 'Helvetica Neue';
  font-weight: 200;
  font-style: normal;
  src: url('./public/fonts/helveticaneuethin-webfont.woff2') format('woff2'),
    url('./public/fonts/helveticaneuethin-webfont.woff') format('woff'),
    url('./public/fonts/HelveticaNeueThin.ttf') format('truetype'),
    url('./public/fonts/HelveticaNeueThin.otf') format('opentype');
  font-display: swap;
}

@font-face {
  font-family: 'Helvetica Neue';
  font-weight: 300;
  font-style: normal;
  src: url('./public/fonts/helveticaneuelight-webfont.woff2') format('woff2'),
    url('./public/fonts/helveticaneuelight-webfont.woff') format('woff'),
    url('./public/fonts/HelveticaNeueLight.ttf') format('truetype'),
    url('./public/fonts/HelveticaNeueLight.otf') format('opentype');
  font-display: swap;
}

@font-face {
  font-family: 'Helvetica Neue';
  font-weight: 400;
  font-style: normal;
  src: url('./public/fonts/helveticaneueroman-webfont.woff2') format('woff2'),
    url('./public/fonts/helveticaneueroman-webfont.woff') format('woff'),
    url('./public/fonts/HelveticaNeueRoman.ttf') format('truetype'),
    url('./public/fonts/HelveticaNeueRoman.otf') format('opentype');
  font-display: swap;
}

:root {
  --primary: #ed2190;
  --primary-dark: #c41d7a;
  --bg: #000000;
  --text: #000000;
  --text-light: #ffffff;
  --gutter: 1rem;
  --pad: 4rem 8vw;
  --pad-sm: 2rem 5vw;
  --fs-base: 1.0rem;
  --fs-lg: 2rem;
  --fs-xl: 3.5rem;
  --font-sans: 'Helvetica Neue', Arial, sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-size: var(--fs-base);
  font-family: var(--font-sans);
  font-weight: 400;
  color: #000000;
  line-height: 2.3;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

/* Native Scrolling Setup */
.main-container {
  width: 100%;
  position: relative;
  min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4,
p {
  margin-bottom: var(--gutter);
  color: #000000;
}

/* Remove space below section headers and their following elements */
h2,
h3,
h4 {
  margin-top: 0;
  margin-bottom: 0;
  color: #000000;
}

/* Remove top margin from paragraphs that follow h2 or h4 elements */
h2 + p,
h4 + p {
  margin-top: 0;
}

/* Remove margins from divs that contain section content */
.section-content {
  margin-top: 0;
}

main,
section {
  margin: 0;
  padding: 0;
}

.fade-in {
  opacity: 0;
  transform: translateY(20%);
  transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

.animated {
  opacity: 1;
  transform: translateY(0);
}

h1 {
  font-size: var(--fs-xl);
  font-weight: 200;
  letter-spacing: -0.02rem;
  line-height: 1.1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  z-index: 3;
  color: #000000;
}

/* Headline Animation Styles */
h1 .line-wrapper,
.footer-title .line-wrapper {
  display: block;
  overflow: visible;
  vertical-align: top;
  line-height: 1.1;
  z-index: 3;
  margin-bottom: 0;
}

h1 .line,
.footer-title .line {
  display: inline-block;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 1.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 1.5s ease-out;
  line-height: 1.1;
  margin: 0;
}

h1.animate-in .line,
.footer-title.animate-in .line {
  transform: translateY(0);
  opacity: 1;
}

p {
  font-size: 1.15rem;  /* Updated to 1.15rem */
  max-width: 100%;
  color: #000000;
}

/* Hero Section */
.hero {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Simple Hero for interior pages */
.hero-simple {
  position: relative;
  width: 100vw;
  min-height: 19.2vh; /* Reduced from 48vh by 60% (48 * 0.4 = 19.2) */
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

/* Logo in top left */
.logo-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
}

.header-logo {
  height: 360px;
  width: auto;
  display: block;
}

.page-title-wrapper {
  text-align: center;
  z-index: 2;
  position: relative;
}

.page-title {
  font-size: 5.76rem; /* 20% larger than 4.8rem (4.8 * 1.2) */
  font-weight: 200;
  color: #000000;
  margin: 0;
  letter-spacing: -0.02rem;
  line-height: 1.1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Portrait Image Styles */
.portrait-wrapper {
  display: flex;
  justify-content: flex-end; /* Align to right */
  margin: -3rem 8vw 4rem 0; /* Moved up ~70px (2rem to -3rem = ~80px up), right margin matches page content */
}

.portrait-image {
  width: 150px;  /* Reduced to 80% of 188px (188 * 0.8 = 150px) */
  height: 150px; /* Reduced to 80% of 188px (188 * 0.8 = 150px) */
  border-radius: 50%;
  object-fit: cover;
  background-color: #e0e0e0; /* Light grey background */
  border: 3px solid #e0e0e0; /* Light grey border */
  font-size: 0; /* Hide alt text */
  text-indent: -9999px; /* Hide alt text */
  overflow: hidden; /* Hide any text overflow */
}

.portrait-image:hover {
  /* No hover effects */
}

/* Page Content */
.page-content {
  background-color: transparent; /* Changed from #ffffff to transparent */
  padding: 0 8vw 4rem 8vw; /* Removed top padding */
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.content-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.placeholder-content {
  padding: 3rem 0 0 0; /* Added 3rem top padding */
  text-align: left;
}

.placeholder-content h2 {
  font-size: 2.5rem;
  font-weight: 200;
  margin-bottom: 0; /* Removed 2rem bottom margin */
  margin-top: 0; /* Ensure no top margin */
  color: #000000;
}

.placeholder-content p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #000000;
  margin-bottom: 2rem;
  font-weight: 400;
}

/* Footer */
.footer {
  background: var(--bg);
  color: var(--text-light);
  padding: var(--pad);
  padding-bottom: 6rem;
  /* Extra bottom padding */
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}

.footer-title {
  font-size: var(--fs-xl);
  font-weight: 200;
  letter-spacing: -0.02rem;
  max-width: 50vw;
  line-height: 1.1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  z-index: 3;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 2.25rem; /* Reverted back from 3.5rem to 2.25rem */
  align-items: center;
}

.btn {
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-block;
  line-height: 1.2;
  font-weight: 400;
  position: relative;
  overflow: hidden;
}

.btn-outline {
  padding: 0.7rem 2.2rem;
  border: none; /* Remove border */
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.20); /* 20% white for 80% black appearance */
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  height: 50px;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.30); /* Slightly lighter on hover */
}

.btn-primary {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  padding: 0;
  font-size: 1rem;
  font-weight: 400;
  background: var(--primary);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  border: none;
}

.btn-primary:hover {
  opacity: 0.9;
}

/* Magnetic Button Effects */
.magnetic-btn {
  position: relative;
  transition: all 0.3s ease;
  will-change: transform;
}

.magnetic-btn:hover {
  transform: scale(1.05);
}

.magnetic-btn.is-magnetic {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-primary.magnetic-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(237, 33, 144, 0.3);
}

.btn-outline.magnetic-btn:hover {
  transform: scale(1.02);
}

/* Responsive (Mobile) */
@media (max-width: 768px) {
  .hero-simple {
    min-height: 20vh; /* Reduced from 50vh by 60% (50 * 0.4 = 20) */
    padding: 4rem 0;
  }

  .page-title {
    font-size: 3.6rem; /* 20% larger than 3rem (3 * 1.2) */
  }

  .portrait-image {
    width: 150px !important;  /* Set to match desktop size */
    height: 150px !important; /* Set to match desktop size */
    min-width: 150px !important;
    max-width: 150px !important;
    min-height: 150px !important;
    max-height: 150px !important;
  }

  /* Center portrait on mobile */
  .portrait-wrapper {
    justify-content: center !important; /* Center on mobile */
    margin: 12rem 0 0 0 !important; /* Increased top margin from 8rem to 12rem for more space from logo */
  }

  .placeholder-content {
    padding: 0 !important;
    margin-top: -2rem !important; /* More aggressive negative margin */
  }

  .placeholder-content h2 {
    font-size: 2.3rem;
    margin-top: 3rem;
  }

  .placeholder-content h3 {
    margin-top: 0 !important;
    margin-bottom: 15px !important;
  }

  .placeholder-content li {
    line-height: 2 !important;
  }

  .content-wrapper {
    padding: 0;
  }

  .page-content {
    flex-direction: column;
    padding: 1rem 5vw 2rem 5vw; /* Reduced top padding from 2rem to 1rem */
    position: relative;
    top: -2rem; /* Further reduced from -4rem to -2rem */
  }

  .footer {
    height: auto;
    position: relative;
    z-index: 1;
    margin-top: 0;
    padding-bottom: 10rem;
    gap: 0.5rem;
  }

  .footer-contact {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }

  .footer-contact .btn {
    display: inline-flex !important;
    /* Ensure they display */
  }

  .footer-title {
    max-width: 100%;
  }
}

/* Resume Download Section */
.resume-section {
  text-align: center;
  margin-top: 4rem;
  padding: 3rem 0 6rem 0;  /* Increased bottom padding from 3rem to 6rem */
}

.resume-section p {
  font-size: 1.15rem;
  color: #666;
  margin-bottom: 2rem;
  font-weight: 400;
}

.resume-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--primary);
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 400;  /* Changed from 300 to 400 (Light) */
  font-family: var(--font-sans);
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
  position: relative;
  will-change: transform;
}

.resume-download-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.02);
}

.resume-download-btn.is-magnetic {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.download-icon {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1); /* Make the SVG white */
}

/* Mobile Resume Section */
@media (max-width: 768px) {
  .resume-section {
    margin-top: 3rem;
    padding: 2rem 0 5rem 0;  /* Increased bottom padding for mobile */
  }
  
  .resume-section p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
  }
  
  .resume-download-btn {
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 400;
  }

  /* Mobile logo */
  .logo-wrapper {
    top: 0;
    left: 0;
  }
  
  .header-logo {
    height: auto;
    width: 100vw;
    max-width: 360px;
  }
}

/* Circular Wipe Effect Styles */
.circular-wipe-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: circle(0% at 50% 50%);
  pointer-events: none;
  z-index: 2;
  border-radius: inherit; /* Inherit button's border-radius for smooth edges */
}

/* Purple button → Much darker pink wipe */
.btn-primary .circular-wipe-overlay {
  background: var(--primary-dark); /* Darker pink */
  color: var(--text-light);
  border-radius: 50%; /* Ensure smooth circular edges */
  box-sizing: border-box;
}

/* Black/White buttons → Dark pink wipe with white text */
.btn-outline .circular-wipe-overlay {
  background: var(--primary-dark); /* Same dark pink as Contact me button */
  color: var(--text-light);
}

/* Ensure overlay text is specifically white */
.btn-outline .btn-text-overlay {
  color: var(--text-light) !important;
}

/* Resume download button wipe effect */
.resume-download-btn .circular-wipe-overlay {
  background: var(--primary-dark); /* Same dark pink as other buttons */
  color: var(--text-light);
  border-radius: 50px; /* Match button's border-radius */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem; /* Same gap as the base button */
}

.resume-download-btn .circular-wipe-overlay .download-icon {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1); /* Make the overlay icon white */
}

.btn-text {
  position: relative;
  z-index: 1;
}

.btn-text-overlay {
  position: relative;
  z-index: 3;
}

/* About page portrait positioning and sizing updates */
.portrait-wrapper {
  top: calc(68% + 94px) !important; /* Move photo up on both desktop and mobile */
}

/* Keep portrait image same size on mobile */
@media (max-width: 768px) {
  .portrait-wrapper {
    top: calc(68% + 94px) !important; /* Moved up from default mobile position */
  }
  
  .portrait-image {
    width: 188px !important; /* Keep desktop size, don't reduce on mobile */
    height: 188px !important; /* Keep desktop size, don't reduce on mobile */
  }
  
  /* Move text content down on mobile to make room for larger photo */
  .page-content {
    margin-top: 4rem !important; /* Add extra top margin on mobile */
    padding-top: 6rem !important; /* Add extra top padding on mobile */
  }
}

/* Ensure consistent text sizing */
.placeholder-content p {
  font-size: 1.15rem !important;
  line-height: 2.16 !important;
  font-weight: 400 !important;
  color: #000000 !important;
}

/* Mobile consistency for all text elements */
@media (max-width: 768px) {
  .placeholder-content p {
    font-size: 1.15rem !important;
    line-height: 2 !important;
    color: #000000 !important;
    margin-top: 0 !important;
    margin-bottom: 18px !important;
  }
}

/* Metric Highlights and Popup System */
.metric-highlight {
  font-weight: bold;
  color: #000000;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  padding: 5px;
  margin: -5px;
}

.metric-highlight:hover {
  color: #333333;
}

/* Popup Container */
.metric-popup {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-50%) scale(0.01);
  background: transparent;
  border-radius: 50%;
  width: 141px;
  height: 141px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1000;
}

.metric-popup.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-50%) scale(1);
}

.metric-popup svg,
.metric-popup img {
  width: 166px;
  height: 166px;
}

/* Ensure popups appear above other content */
.metric-highlight {
  z-index: 999;
}

/* Mobile popup adjustments */
@media (max-width: 768px) {
  .metric-popup {
    width: 139px;
    height: 139px;
    top: 0;
  }
  
  .metric-popup svg,
  .metric-popup img {
    width: 139px;
    height: 139px;
  }
}
