/* styles.css — theme variables & layout */
:root{
  /* Updated body color to #fefae0 */
  --bg: #fefae0;
  --surface:#07101a;
  /* Updated text color to black for better contrast on cream background */
  --text:#000000;
  /* header/content left offset — used to align header text, nav and main content */
  --header-text-offset: 18px;
  --masthead-offset:1rem;
  --subheader-overlay:0.35rem; /* vertical gap between header and nav when overlaying the hero (positive keeps them stacked) */
  --muted-border:rgba(255,255,255,0.04);
  --accent:#7dd3fc;
  --accent-strong:#5cc0f0;
  /* Button shadow matching the spotify-style shadow used on social bubble */
  --btn-shadow: 0 6px 18px rgba(2,6,23,0.45);
  --btn-shadow-hover: 0 8px 24px rgba(2,6,23,0.6);
  /* small nudge for the pill row so its visual left edge lines up with header text */
  --pill-nudge: 14px;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  display:flex;
  flex-direction:column;
  min-height:100vh;
  /* Prefer Monaco; fall back to Menlo, Courier New, then generic monospace */
  font-family: Monaco, Menlo, "Courier New", monospace;
  background:var(--bg);
  background-attachment:fixed; /* ensure gradient stays in place */
  background-size:100% 100%; /* stretch gradient to full body */
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.6;
  /* padding-bottom kept minimal because footer is now part of the flow */
  padding-bottom:0;
}

/* Header */
header{
  background:transparent; /* make header transparent so hero shows through */
  color:#ffffff; /* header letters remain white */
  position:relative; /* positioned so z-index works inside the masthead */
  z-index:61; /* ensure header sits above masthead's stacking context */
  /* left-align header container; header text offset from the viewport left edge */
  text-align:left;
  /* thinner header: keep same vertical spacing but offset text 60px from the left wall */
  padding:1.05rem 1rem 1.05rem var(--header-text-offset); /* top right bottom left */
  border-bottom:none; /* remove visible line so photo shows cleanly behind header */
}

/* Non-home masthead (gradient header for Experience, Contact, Projects) */
body:not(.has-hero) .masthead{
  background: linear-gradient(180deg, 
    #260701 0%,
    #2f0e07 10%,
    #38160d 20%,
    #411d13 30%,
    #4a2419 40%,
    #532c1e 50%,
    #5c3324 60%,
    #653a2a 70%,
    #6e4230 85%,
    #774936 100%
  ); /* Rich dark-to-light brown gradient (top to bottom) from Coolors palette */
  position:relative;
  z-index:65;
}
body:not(.has-hero) header,
body:not(.has-hero) .subheader{
  background:transparent; /* keep header elements visually part of masthead */
  /* draw a subtle separation line against the body gradient if present */
  border-bottom:1px solid rgba(255,255,255,0.04);
  box-shadow:none;
  color: #ffffff; /* Ensure white text for good contrast on brown gradient */
}

/* Make header text slightly smaller to match reduced padding */
header h1{font-size:1.6rem;line-height:1.15;margin-bottom:0.25rem}
header p{font-size:0.95rem;margin-top:0}

/* Ensure Experience page header matches Contact/Projects size */
body:not(.has-hero) header h1 {
  font-size: 2rem !important;
  line-height: 1.15;
  margin-bottom: 0.25rem;
}

body:not(.has-hero) header p {
  font-size: 1.1rem !important;
  margin-top: 0;
}

/* Specific override for about-section pages to ensure consistency */
.about-section header h1 {
  font-size: 2rem !important;
  line-height: 1.15;
  margin-bottom: 0.25rem;
}

.about-section header p {
  font-size: 1.1rem !important;
  margin-top: 0;
}

/* Sub-header (navigation row) */
.subheader{
  /* keep the subheader transparent; it will now flow under the header (stacked) */
  background: transparent;
  border-top: none;
  border-bottom: none;
  /* spacing for the stacked nav; add left padding to align under the header text */
  padding:0.25rem 0 0.25rem var(--header-text-offset); /* top right bottom left */
  box-shadow: none;
  /* align items to the left so nav lines up with header text */
  justify-content:flex-start;
}
.hero-bg{
  /* Hero: full-viewport image */
  position:relative;
  overflow:hidden;
  width:100%;
  height:100vh; /* cover the full viewport initially */
  display:block;
  border-bottom:1px solid rgba(255,255,255,0.03);
}

/* Reduce top gap after hero */
.hero-bg + main{margin-top:0.75rem}

/* Extra gap when no hero */
.masthead + main{margin-top:2rem}

/* Hero image styles */
.hero-img{
  position:relative;
  display:block;
  width:100%;
  height:100%;
  max-width:none;
  object-fit:cover; /* fill hero area — crops where necessary */
  transform:translate3d(0,0,0);will-change:transform;
}

/* Hero text */
.hero-quote{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  z-index:20; /* above the image but beneath the overlayed nav (.subheader has z-index:40) */
  color:#ffffff; /* white hero letters */
  text-align:center;
  padding:0 1rem;
  width:100%;
  max-width:1100px;
  font-weight:800;
  /* responsive sizing: larger and clamped for legibility */
  font-size:clamp(1.75rem, 6vw, 4rem);
  line-height:1.02;
  text-transform:uppercase; /* all caps */
  letter-spacing:0.06em;
  text-shadow: 0 8px 20px rgba(0,0,0,0.65); /* keep subtle shadow for contrast */
  pointer-events:none; /* clicks pass through to underlying controls */
  
  /* Initial animation state */
  opacity: 0;
  transform: translate(-50%, -50%) translateY(30px);
  animation: heroTextFadeIn 1.5s ease-out 0.5s forwards;
}

/* Hero text animation */
@keyframes heroTextFadeIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0);
  }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  color: #ffffff;
  text-align: center;
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  animation: scrollIndicatorFadeIn 1s ease-out 2s forwards;
}

.scroll-indicator.fade-out {
  animation: none;
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

.scroll-indicator::before {
  content: "";
  display: block;
  width: 2px;
  height: 30px;
  background: rgba(255, 255, 255, 0.6);
  margin: 0 auto 8px;
  animation: scrollLine 2s ease-in-out infinite;
}

.scroll-indicator::after {
  content: "⌄";
  display: block;
  font-size: 1.2rem;
  font-weight: 300;
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-text {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 5px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* Scroll indicator animations */
@keyframes scrollIndicatorFadeIn {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes scrollLine {
  0%, 100% { height: 30px; opacity: 0.6; }
  50% { height: 20px; opacity: 1; }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* Masthead layout & overlay behavior */
.masthead{
  /* Default: masthead is in the normal document flow so pages without a hero
     show the header and nav at the top above the main content. When a page
     needs the overlay effect the body will receive `.has-hero` and the
     masthead will be absolutely positioned there. */
  position:relative;
  display:flex;
  flex-direction:column;
  /* align header and subheader to the left edge by default; header text
     will be offset with padding so it sits 60px from the viewport wall */
  align-items:flex-start;
  width:100%;
  pointer-events:auto;
}

/* .has-hero: overlay masthead on hero */
.has-hero .masthead{
  position:absolute;
  top:0;
  left:0;
  width:100%;
  z-index:60; /* above hero but allow header/subheader to set own child z-indexes */
}
.subheader{
  /* Subheader (nav) overlay */
  position:relative;
  left:0;
  right:0;
  top:auto;
  transform:none;
  z-index:62; /* ensure nav sits above the hero image */
  /* small positive gap beneath the header (use variable) */
  margin-top:var(--subheader-overlay);
  display:flex;
  /* align the nav items under the left-aligned header text and match the
    header offset so they line up visually with header content */
  justify-content:flex-start;
  padding-left:var(--header-text-offset);
  width:100%;
  padding:0.6rem 0;
}
.hero-bg{padding-top:0; z-index:10} /* hero sits beneath the overlayed nav */
/* Layout flex rules */
.hero-bg{flex:0 0 auto}
main{flex:1 0 auto}

/* Ensure the main container (Experience, Projects, Contact) sits above the hero image
  so the photo never visually overlaps those sections. */
.container{position:relative;z-index:30}
/* Legacy alias kept but neutralized: avoid boxed appearance when `.container` is still present in markup */
.container{max-width:none;background:transparent;border:none;border-radius:0;padding:0;margin:0}
main{position:relative;z-index:30}

/* On small screens avoid overlap and parallax (lighter weight) */
@media (max-width:720px){
  /* Smaller font size for mobile devices */
  body {
    font-size: 14px;
  }
  
  /* Mobile adjustments */
  .subheader{
    position:relative;
    left:0;
    right:0;
    top:auto;
    transform:none;
    padding:0.45rem 0;
    justify-content:center;
    /* reduce the overlay on small screens so nav doesn't overlap too much */
    margin-top:0.2rem;
  }
  .hero-bg{padding-top:0}
  /* smaller upward offset on narrow screens to avoid overlapping too much */
  .hero-bg{margin-top: -2rem}
  /* Allow nav links to wrap on narrow screens so they stay usable */
  nav ul{flex-wrap:wrap;gap:0.6rem}

  /* On narrow screens restore centered header layout and remove the 60px
     left padding so the header remains flush and avoids horizontal overflow */
  .masthead{ align-items:center }
  header{ padding-left:1rem; text-align:center }
  /* restore centered nav on small screens and remove the extra left padding */
  .subheader{ justify-content:center; padding-left:0 }
  /* ensure the nav list is centered on small screens as well */
  nav{ justify-content:center; padding:0.25rem 0.5rem }
  nav ul{ justify-content:center }
  /* reset pill-row left margin on small screens */
  .subheader nav ul{ margin-left: 0 }
  /* remove the first-child nudge on narrow viewports so centered nav is exact */
  .subheader nav a:first-child{ margin-left: 0 }
  /* reset main left padding on small screens so content has usable gutters */
  main{ padding-left:0.75rem }
}
.subheader nav ul{ margin:0 0 0 var(--pill-nudge) }

/* Navigation: layout & pill styles */
nav{background:transparent;padding:0.25rem 0;display:flex;justify-content:flex-start;gap:1rem;align-items:center}
nav ul{list-style:none;display:flex;justify-content:flex-start;gap:1.25rem;margin:0;padding-left:0}
/* Pill-style navigation buttons: centered, subtle background, rounded */
nav a{
  color: #ffffff; /* make nav button letters pure white */
  text-decoration: none;
  display: inline-block;
  /* slightly smaller pill buttons */
  padding: 0.35rem 0.85rem;
  font-size:0.95rem;
  border-radius: 9999px; /* pill */
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  transition: background .18s ease, transform .08s ease, color .12s, box-shadow .12s ease;
  /* apply spotify-style outer shadow while keeping the subtle inset for depth */
  box-shadow: var(--btn-shadow), 0 1px 0 rgba(0,0,0,0.18) inset;
}
nav a:hover{
  background: linear-gradient(90deg, rgba(125,211,252,0.08), rgba(125,211,252,0.06));
  color: #ffffff; /* remain white on hover */
  transform: translateY(-1px);
  box-shadow: var(--btn-shadow-hover), 0 1px 0 rgba(0,0,0,0.18) inset;
}
nav a:focus{
  outline: 3px solid rgba(125,211,252,0.12);
  outline-offset: 3px;
  color: #ffffff; /* remain white on focus */
}

/* Align first nav item */
.subheader nav a:first-child{ margin-left: 0 }

/* Container */
.container{ /* neutralized: legacy alias - no box styling */
  max-width:none;
  margin:0;
  padding:0;
  background:transparent;
  color:inherit;
  border:none;
  border-radius:0;
}

/* Main content layout */
main{
  width:100%;
  max-width:none;
  margin:0;
  /* use the same left offset as the header so main content aligns with header text */
  padding:1.25rem 1.25rem 0 var(--header-text-offset); /* top right bottom left - removed bottom padding */
  /* Increase base font-size for main content for better readability */
  font-size:1.125rem; /* ~18px */
  background:transparent; /* let the page gradient show through */
  color:inherit;
  border:none;
  border-radius:0;
}

@media (min-width:1000px){
  /* Slightly larger type on wide screens */
  main{ font-size:1.1875rem; /* ~19px */ }
}

/* Sections */
.about-section{margin:1.5rem 0}

/* Robot Arm Styling */
.robot-arm {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.arm-base {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 75px;
  height: 38px;
  background: linear-gradient(135deg, #2c2c2c, #444);
  border: 3px solid #1a1a1a;
  border-radius: 12px 12px 6px 6px;
  z-index: 4;
  overflow: hidden;
}

.arm-base::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: #1a1a1a;
  border: 2px solid #555;
  border-radius: 50%;
}

.arm-segment-1 {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform-origin: bottom center;
  width: 15px;
  height: 90px;
  background: linear-gradient(90deg, #3a3a3a, #555);
  border: 2px solid #1a1a1a;
  border-radius: 8px;
  transform: translateX(-50%) rotate(0deg);
  transition: none;
  z-index: 1;
}

.arm-segment-1::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  background: #2c2c2c;
  border: 2px solid #1a1a1a;
  border-radius: 50%;
}

.arm-segment-1::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  background: #2c2c2c;
  border: 2px solid #1a1a1a;
  border-radius: 50%;
}

.arm-segment-2 {
  position: absolute;
  bottom: 128px;
  left: 50%;
  transform-origin: bottom center;
  width: 12px;
  height: 68px;
  background: linear-gradient(90deg, #3a3a3a, #555);
  border: 2px solid #1a1a1a;
  border-radius: 6px;
  transform: translateX(-50%) rotate(0deg);
  transition: none;
  z-index: 2;
}

.arm-segment-2::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 15px;
  height: 15px;
  background: #2c2c2c;
  border: 2px solid #1a1a1a;
  border-radius: 50%;
}

.arm-segment-2::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 15px;
  height: 15px;
  background: #2c2c2c;
  border: 2px solid #1a1a1a;
  border-radius: 50%;
}

.arm-segment-3 {
  position: absolute;
  bottom: 195px;
  left: 50%;
  transform-origin: bottom center;
  width: 9px;
  height: 53px;
  background: linear-gradient(90deg, #3a3a3a, #555);
  border: 2px solid #1a1a1a;
  border-radius: 5px;
  transform: translateX(-50%) rotate(0deg);
  transition: none;
  z-index: 1;
}

.arm-segment-3::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #2c2c2c;
  border: 2px solid #1a1a1a;
  border-radius: 50%;
}

.arm-segment-3::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #2c2c2c;
  border: 2px solid #1a1a1a;
  border-radius: 50%;
}

.arm-end {
  position: absolute;
  bottom: 195px;
  left: 50%;
  width: 9px;
  height: 12px;
  background: linear-gradient(45deg, #4a4a4a, #666);
  border: 2px solid #1a1a1a;
  border-radius: 3px;
  transform: translateX(-50%);
  transition: none;
  z-index: 1;
}

.arm-end::before {
  content: '';
  position: absolute;
  top: 9px;
  left: 2px;
  width: 23px;
  height: 4px;
  background: linear-gradient(90deg, #555, #777);
  border: 1px solid #333;
  border-radius: 2px;
  transform: rotate(-60deg);
  transform-origin: left top;
}

.arm-end::after {
  content: '';
  position: absolute;
  top: 9px;
  right: 2px;
  width: 23px;
  height: 4px;
  background: linear-gradient(90deg, #555, #777);
  border: 1px solid #333;
  border-radius: 2px;
  transform: rotate(60deg);
  transform-origin: right top;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* About Me section layout */
.about-row {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin: 3rem auto;
  max-width: 1200px;
  justify-content: center;
}

.about-row.centered-only {
  justify-content: center;
}

.about-text-centered {
  flex: 1;
  text-align: center;
  max-width: 600px;
  padding: 0 1rem;
}

.about-text-centered.full-width {
  max-width: 800px;
}

.about-image {
  flex: 0 0 300px;
  text-align: center;
}

.about-photo {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.about-text-centered p {
  font-size: 1.3rem;
  line-height: 1.7;
  margin: 0;
}

/* Responsive: stack on smaller screens */
@media (max-width: 768px) {
  .about-row,
  .about-row.reverse {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .about-image {
    flex: none;
  }
  
  .about-photo {
    max-width: 250px;
  }
  
  .about-text-centered.full-width {
    max-width: 100%;
  }
}

/* Experience page bullet point animations */
.bullet-point {
  opacity: 0;
  transform: translate3d(-30px, 0, 0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: transform, opacity;
  margin-top: 2rem; /* Add space above bullet points */
  font-size: 1.2rem; /* Larger font for bullet points */
}

.bullet-point.animate-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

/* Skills section styling */
.skills-section {
  margin: 3rem 0;
}

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

.skill-item {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity 0.7s cubic-bezier(0.4, 0.0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform, opacity;
  background: #272123;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--muted-border);
}

.skill-item.animate-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

.skill-item h3 {
  color: #e6f7ff;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  text-align: center;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.skill-tag {
  background: linear-gradient(135deg, rgba(125,211,252,0.2), rgba(124,58,237,0.2));
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(125,211,252,0.3);
  transition: all 0.3s ease;
}

.skill-tag:hover {
  background: linear-gradient(135deg, rgba(125,211,252,0.3), rgba(124,58,237,0.3));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(125,211,252,0.2);
}

/* Staggered animation for skill items */
.skill-item:nth-child(1).animate-in { transition-delay: 0.1s; }
.skill-item:nth-child(2).animate-in { transition-delay: 0.2s; }
.skill-item:nth-child(3).animate-in { transition-delay: 0.3s; }

/* Center the third skill item when it's alone on its row */
.skill-item:nth-child(3) {
  grid-column: 1 / -1;
  max-width: 400px;
  margin: 0 auto;
}

/* Make the main experience paragraph larger */
.about-section .center-block p:not(.bullet-point) {
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 2.5rem; /* More space before bullet points */
}

/* Stagger animation delays for bullet points */
.bullet-point:nth-of-type(2).animate-in { transition-delay: 0.2s; }
.bullet-point:nth-of-type(3).animate-in { transition-delay: 0.4s; }
.bullet-point:nth-of-type(4).animate-in { transition-delay: 0.6s; }

/* Scroll animation for About Me section - ONLY on homepage with hero */
body.has-hero .about-section {
  isolation: isolate; /* Create new stacking context to prevent conflicts with hero */
  transform-style: preserve-3d; /* Ensure proper 3D rendering */
}

/* Individual About Me row animations */
body.has-hero .about-row {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity 0.7s cubic-bezier(0.4, 0.0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform, opacity;
}

body.has-hero .about-row.animate-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

/* Staggered delays for each About Me row */
body.has-hero .about-row:nth-child(2).animate-in { transition-delay: 0.2s; } /* First paragraph */
body.has-hero .about-row:nth-child(3).animate-in { transition-delay: 0.4s; } /* Second paragraph */
body.has-hero .about-row:nth-child(4).animate-in { transition-delay: 0.6s; } /* Third paragraph */

/* About Me title animation */
body.has-hero .about-section h2 {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity 0.6s cubic-bezier(0.4, 0.0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform, opacity;
}

body.has-hero .about-section h2.animate-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

/* Remove bottom margin from contact section to prevent brown band */
section#contact{margin-bottom:0}
.contact-center{margin-bottom:0}

/* Homepage contact section scroll animations - ONLY on homepage with hero */
body.has-hero #contact h2 {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity 0.6s cubic-bezier(0.4, 0.0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform, opacity;
}

body.has-hero #contact h2.animate-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

body.has-hero #contact .profile-image {
  opacity: 0;
  transform: translate3d(-40px, 0, 0) scale(0.9);
  transition: opacity 0.7s cubic-bezier(0.4, 0.0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform, opacity;
}

body.has-hero #contact .profile-image.animate-in {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  will-change: auto;
}

body.has-hero #contact .contact-info {
  opacity: 0;
  transform: translate3d(40px, 0, 0);
  transition: opacity 0.8s cubic-bezier(0.4, 0.0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform, opacity;
}

body.has-hero #contact .contact-info.animate-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

body.has-hero #contact .social-buttons {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition: opacity 0.6s cubic-bezier(0.4, 0.0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform, opacity;
}

body.has-hero #contact .social-buttons.animate-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

/* Staggered animation for homepage contact social buttons */
body.has-hero #contact .social-bubble {
  opacity: 0;
  transform: translate3d(0, 15px, 0) scale(0.8);
  transition: opacity 0.5s cubic-bezier(0.4, 0.0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform, opacity;
}

body.has-hero #contact .social-bubble.animate-in {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  will-change: auto;
}

body.has-hero #contact .social-bubble:nth-child(1).animate-in { transition-delay: 0.1s; }
body.has-hero #contact .social-bubble:nth-child(2).animate-in { transition-delay: 0.2s; }
body.has-hero #contact .social-bubble:nth-child(3).animate-in { transition-delay: 0.3s; }

/* Projects grid and cards */
.projects-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:2rem;margin:2rem 0}
.project-card{background:#272123;border:1px solid var(--muted-border);padding:1.5rem;border-radius:8px}
.project-card h3{color:#e6f7ff; margin-bottom:1rem}
.project-card p{color:#ffffff}
.project-image{width:100%;height:200px;object-fit:cover;border-radius:6px;margin-bottom:1rem}

/* Scroll animation for project cards - ONLY on homepage with hero */
body.has-hero .project-card {
  opacity: 0;
  transform: translate3d(0, 40px, 0) scale(0.95);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: transform, opacity;
}

body.has-hero .project-card.animate-in {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  will-change: auto;
}

/* All project cards appear together - no staggered delays on homepage */

/* Scroll animation for project cards - ONLY on Projects page (no has-hero class) */
body:not(.has-hero) .project-card {
  opacity: 0;
  transform: translate3d(0, 50px, 0) scale(0.95);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  will-change: transform, opacity;
}

body:not(.has-hero) .project-card.animate-in {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  will-change: auto;
}

/* Stagger animation delay for Projects page */
body:not(.has-hero) .project-card:nth-child(1).animate-in { transition-delay: 0.1s; }
body:not(.has-hero) .project-card:nth-child(2).animate-in { transition-delay: 0.3s; }
body:not(.has-hero) .project-card:nth-child(3).animate-in { transition-delay: 0.5s; }
body:not(.has-hero) .project-card:nth-child(4).animate-in { transition-delay: 0.7s; }

/* Links */
a{color:var(--accent)}
a:hover{color:var(--accent-strong)}

/* Footer */
/* Footer matches the last color stop of the page gradient for a cohesive edge */
footer{background:transparent;color:var(--text);text-align:center;padding:1rem 0;border-top:1px solid rgba(255,255,255,0.04);position:static;margin-top:3rem}

/* Utility */
p small{color:rgba(230,238,248,0.7)}

/* Responsive tweaks */
@media (max-width:480px){
  nav ul{gap:0.5rem;flex-wrap:wrap;justify-content:center}
  /* reduce mobile nav button padding too */
  nav{padding:0.2rem 0.5rem;justify-content:center}
  nav a{padding:0.3rem 0.6rem;font-size:0.92rem}
  .container{padding:0.75rem}
  main{padding:0.75rem 0.75rem 0 0.75rem} /* removed bottom padding to prevent brown band */
  
  /* Center navigation on mobile */
  .subheader nav ul{ margin:0;justify-content:center }
}

/* Utility: center short text blocks */
.center-text{ text-align:center }

/* Centered content block with justified text and even edges */
.center-block{
  max-width:920px; /* limit line length for readability */
  margin:1.25rem auto; /* center block horizontally */
  padding:0 1rem;
  text-align:justify; /* even left and right edges */
  -webkit-hyphens:auto;
  -ms-hyphens:auto;
  hyphens:auto;
  color:inherit; /* inherit from .container so text is readable on white */
}
.center-block p{margin-bottom:0.9rem}
/* Center the last line for a nicer visual balance on short final lines */
.center-block p:last-child{ text-align:center; text-align-last:center }

/* Contact page: profile image and layout */
.contact-grid{
  display:flex;
  gap:2.5rem; /* increase space between image and text */
  align-items:flex-start; /* align to top so tall text doesn't vertically center/cut the image */
  margin-top:0.45rem; /* tighten space below the section heading on Contact page */
  overflow:visible; /* ensure image isn't clipped by parent */
  margin-bottom:4rem; /* ensure larger space before footer so image isn't near fixed footer */
}
/* Contact page: transparent background */
.contact-page{
  background: transparent; /* let the body gradient show through */
  color: #ffffff; /* white text across contact area */
  border: none; /* keep no border */
  border-bottom: none; /* ensure no bottom border */
  box-shadow: none;
  padding-bottom: 0; /* remove any bottom padding that might create space */
}

/* .contact-center: homepage contact layout */
.contact-center .contact-grid{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:1rem;
  margin-top:0.6rem;
  margin-bottom:0; /* remove bottom margin to eliminate brown band */
}
.contact-center .contact-info{
  max-width:100%;
  margin:0;
}
.contact-center .profile-image{
  margin:1rem auto 0; /* nudge the profile photo lower on the homepage contact block */
  box-shadow: 0 6px 18px rgba(2,6,23,0.5);
}

/* contact-page.contact-center: constrain width */
.contact-page.contact-center h2{ text-align:center }
.contact-page.contact-center .contact-info{ max-width:700px; margin:0 auto }
.contact-page.contact-center .contact-form{ margin:0 auto }

/* Contact page scroll animations */
.contact-page h2 {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity 0.6s cubic-bezier(0.4, 0.0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform, opacity;
}

.contact-page h2.animate-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

.contact-page .profile-image {
  opacity: 0;
  transform: translate3d(-40px, 0, 0) scale(0.9);
  transition: opacity 0.7s cubic-bezier(0.4, 0.0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform, opacity;
}

.contact-page .profile-image.animate-in {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  will-change: auto;
}

.contact-page .contact-form {
  opacity: 0;
  transform: translate3d(40px, 0, 0);
  transition: opacity 0.8s cubic-bezier(0.4, 0.0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform, opacity;
}

.contact-page .contact-form.animate-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

.contact-page .social-buttons {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition: opacity 0.6s cubic-bezier(0.4, 0.0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform, opacity;
}

.contact-page .social-buttons.animate-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

/* Staggered animation for social buttons */
.contact-page .social-bubble {
  opacity: 0;
  transform: translate3d(0, 15px, 0) scale(0.8);
  transition: opacity 0.5s cubic-bezier(0.4, 0.0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform, opacity;
}

.contact-page .social-bubble.animate-in {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  will-change: auto;
}

.contact-page .social-bubble:nth-child(1).animate-in { transition-delay: 0.1s; }
.contact-page .social-bubble:nth-child(2).animate-in { transition-delay: 0.2s; }
.contact-page .social-bubble:nth-child(3).animate-in { transition-delay: 0.3s; }

/* Contact page text in black for cream background */
.contact-page h2,
.contact-page p,
.contact-page .contact-info,
.contact-page .form-note,
.contact-page label{ color: #000000 }
.contact-page a{ color: #000000 }

/* Form inputs */
.contact-page .contact-form input[type="text"],
.contact-page .contact-form input[type="email"],
.contact-page .contact-form input[type="url"],
.contact-page .contact-form textarea{
  background: rgba(255,255,255,0.9);
  color: #041526; /* dark text for legibility inside inputs */
  border: 1px solid rgba(0,0,0,0.12);
}

/* Adjust button appearance on contact page for visibility */
.contact-page .btn-primary{
  /* make the contact page "Send message" button a dark brown with white text */
  background: #523726; /* dark brown matching footer/gradient end */
  color: #ffffff; /* white label for contrast */
  border: none;
  box-shadow: var(--btn-shadow);
}
.contact-page .btn-primary:hover{ /* ensure label stays white on hover and shadow intensifies */
  color: #ffffff;
  box-shadow: var(--btn-shadow-hover);
}
.contact-info{
  /* push text further to the right and limit width */
  max-width: calc(100% - 220px);
}
.profile-image{
  width:200px; /* preferred display width */
  height:auto; /* preserve aspect ratio and avoid cropping */
  max-height:220px; /* keep image from becoming too tall */
  border-radius:12px;
  object-fit:cover;
  border:1px solid rgba(255,255,255,0.06);
  box-shadow: 0 6px 18px rgba(2,6,23,0.6);
}

@media (max-width:600px){
  .contact-grid{flex-direction:column;align-items:flex-start;gap:1rem}
  .profile-image{width:160px;height:auto;max-height:180px}
  .contact-info{max-width:100%}
}

/* Contact form styles */
.contact-form{margin-top:1.25rem;display:flex;flex-direction:column;gap:0.75rem;max-width:700px}
.contact-form label{font-size:0.95rem;color:rgba(230,238,248,0.9)}
.contact-form input[type="text"],.contact-form input[type="email"],.contact-form input[type="url"],.contact-form textarea{
  width:100%;padding:0.65rem 0.75rem;border-radius:8px;border:1px solid rgba(255,255,255,0.06);background:rgba(255,255,255,0.02);color:var(--text);resize:vertical;font-size:0.95rem
}
.contact-form textarea{min-height:140px}
.contact-form .form-row{display:flex;gap:0.75rem}
.contact-form .form-row > *{flex:1}
.contact-form .btn-primary{ /* center the Send button inside the contact form */
  align-self:center;
  margin-top:0.5rem;
}
.btn-primary{display:inline-block;padding:0.6rem 1.1rem;border-radius:9999px;background:linear-gradient(90deg,var(--accent),var(--accent-strong));color:#041526;border:none;cursor:pointer;font-weight:600}
.btn-primary{box-shadow:var(--btn-shadow)}
.btn-primary:hover{opacity:0.95;transform:translate3d(0, -1px, 0);box-shadow:var(--btn-shadow-hover)}
.form-note{font-size:0.9rem;color:rgba(230,238,248,0.8);margin-bottom:1.5rem}
.form-success{margin-top:0.5rem;padding:0.6rem 0.8rem;background:rgba(125,211,252,0.08);border:1px solid rgba(125,211,252,0.12);color:var(--accent);border-radius:6px;display:none}
.form-submit-row{display:flex;gap:0.75rem;align-items:center;margin-top:0.5rem}

@media (max-width:600px){
  .contact-form .form-row{flex-direction:column}
}

/* Center the Contact page heading */
.contact-page h2{ text-align:center; margin-bottom:0.35rem }

.social-bubble{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  border-radius:50%;
  background:linear-gradient(135deg, rgba(125,211,252,0.08), rgba(124,58,237,0.08));
  border:1px solid rgba(255,255,255,0.04);
  color:var(--accent);
  text-decoration:none;
  transition:transform .12s ease, box-shadow .12s ease, background .12s;
  /* give social bubbles the same base shadow as other buttons */
  box-shadow: var(--btn-shadow);
}
.social-bubble:hover{transform:translate3d(0, -3px, 0);box-shadow:var(--btn-shadow-hover);background:linear-gradient(135deg, rgba(125,211,252,0.12), rgba(124,58,237,0.12));}
.social-bubble svg{width:20px;height:20px;fill:currentColor}

@media (max-width:600px){
  .social-bubble{width:40px;height:40px}
}

/* Social buttons container: align multiple circular icons with spacing */
.social-buttons{display:flex;gap:0.5rem;align-items:center;justify-content:center}

/* Remove margin from paragraph containing social buttons to prevent brown band */
p:has(.social-buttons){margin:0}
.contact-info p:last-child{margin-bottom:0}

/* Allow icons inside the bubble to size consistently (SVG or IMG) */
.social-bubble img,.social-bubble .social-icon{width:20px;height:20px;display:block}
@media (max-width:600px){
  .social-bubble img,.social-bubble .social-icon{width:18px;height:18px}
}

/* Brand color variants for social bubbles */
.social-bubble.instagram{ /* keep subtle gradient but ensure white icon */
  background: radial-gradient(circle at 30% 20%, #feda75 0%, #fa7e1e 30%, #d62976 60%, #962fbf 85%);
  color:#fff;
  border-color: rgba(255,255,255,0.06);
}
.social-bubble.instagram:hover{box-shadow:0 8px 24px rgba(214,41,118,0.18)}

.social-bubble.linkedin{
  background: #0A66C2; /* LinkedIn brand blue */
  color: #ffffff;
  border-color: rgba(255,255,255,0.06);
}
.social-bubble.linkedin:hover{box-shadow:0 8px 24px rgba(10,102,194,0.18)}

.social-bubble.spotify{
  background: #1DB954; /* Spotify green */
  color: #ffffff;
  border-color: rgba(255,255,255,0.06);
}
/* Force small bitmap logo to be visible on green background by inverting/brightening */
.social-bubble.spotify img{filter:brightness(0) invert(1);width:20px;height:20px;display:block}
@media (max-width:600px){
  .social-bubble.spotify img{width:18px;height:18px}
}

/* Small Instagram photo next to the bubble (not currently used) */
/* Removed unused .insta-photo styles to keep stylesheet lean. */

/* Responsive video styling for mobile devices */
.scroll-video {
    display: none; /* Hidden by default on desktop */
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

/* Media query for tablet and mobile devices */
@media (max-width: 768px) {
    .robot-arm {
        display: none; /* Hide robot arms on smaller screens */
    }
    
    /* Show only the first video on mobile */
    .scroll-video {
        display: none; /* Hide all videos by default */
    }
    
    /* Show only the first video (in the first about-row) */
    .about-row:first-of-type .scroll-video {
        display: block;
    }
    
    .about-image {
        position: relative;
        overflow: hidden;
    }
    
    /* Hide the entire about-image containers for 2nd and 3rd sections on mobile */
    .about-row:not(:first-of-type) .about-image {
        display: none;
    }
}

/* Game Mode Styles */
.game-description {
    background: linear-gradient(135deg, var(--surface) 0%, #0f1419 50%, var(--surface) 100%);
    padding: 3rem 1rem;
    margin: 0;
    color: #ffffff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.game-description::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(125, 211, 252, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(92, 192, 240, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.game-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.game-description h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--accent), var(--accent-strong));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(125, 211, 252, 0.3);
}

.game-instructions {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: #e2e8f0;
}

.highlight-text {
    color: var(--accent);
    font-weight: bold;
    text-shadow: 0 0 10px rgba(125, 211, 252, 0.4);
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.stat-item {
    background: rgba(7, 16, 26, 0.8);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    border: 1px solid var(--accent);
    font-size: 1rem;
    font-weight: bold;
    color: #ffffff;
    min-width: 120px;
    box-shadow: 0 4px 15px rgba(125, 211, 252, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(125, 211, 252, 0.3);
}

/* Robot arm game enhancements */
.clickable-arm {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.clickable-arm:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.clickable-arm.arm-hover::before {
    content: 'Click to reset!';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 100;
    white-space: nowrap;
    border: 1px solid var(--accent);
    box-shadow: 0 4px 15px rgba(125, 211, 252, 0.3);
    animation: tooltipPulse 2s infinite;
}

@keyframes tooltipPulse {
    0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.7; transform: translateX(-50%) translateY(-5px); }
}

.arm-resetting {
    animation: armReset 1s ease-out;
}

@keyframes armReset {
    0% { transform: scale(1); filter: brightness(1.5) hue-rotate(120deg); }
    25% { transform: scale(0.9); filter: brightness(2) hue-rotate(240deg); }
    50% { transform: scale(1.1); filter: brightness(1.8) hue-rotate(360deg); }
    75% { transform: scale(0.95); filter: brightness(1.3) hue-rotate(180deg); }
    100% { transform: scale(1); filter: brightness(1) hue-rotate(0deg); }
}

.arm-hitbox {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: transparent;
    border-radius: 10px;
    z-index: 10;
}

/* Game mode body adjustments */
.game-mode {
    background: var(--bg);
}

.game-mode .masthead {
    position: relative;
    z-index: 50;
}

/* Initial warning overlay - separate from hero */
.initial-warning-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000000;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 15vh;
  cursor: pointer;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.initial-warning-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Hide warning overlay on mobile/tablet since robot arms don't work well on touch */
@media (max-width: 1024px) {
  .initial-warning-overlay {
    display: none !important;
  }
}

/* Warning buttons */
.warning-buttons {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
}

.warning-buttons.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.warning-btn {
  padding: 1rem 2rem;
  border: 2px solid;
  border-radius: 8px;
  font-family: 'Courier New', 'Monaco', monospace;
  font-weight: bold;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
  min-width: 200px;
  pointer-events: none;
}

.warning-buttons.show .warning-btn {
  pointer-events: all;
}

/* Disable scrolling when warning is active */
body.warning-active {
  overflow: hidden;
}

.refuse-btn {
  border-color: #ff6b6b;
  color: #ff6b6b;
}

.refuse-btn:hover {
  background: #ff6b6b;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.accept-btn {
  border-color: #4CAF50;
  color: #4CAF50;
}

.accept-btn:hover {
  background: #4CAF50;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.warning-text {
  text-align: center;
  max-width: 95vw;
  width: 100%;
  margin-bottom: 2rem;
  font-size: 4rem;
  line-height: 1.8;
  padding: 0 2rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  letter-spacing: 4px;
  text-transform: uppercase;
  word-spacing: 8px;
}

.typewriter-text {
  display: inline;
  border-right: 3px solid #ff6b6b;
  animation: blink 1s infinite;
}

.typewriter-char {
  opacity: 0;
  animation: dropIn 0.1s ease-out forwards;
}

@keyframes dropIn {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0%, 50% { border-color: #ff6b6b; }
  51%, 100% { border-color: transparent; }
}

.overlay-hint {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Robot Warning Overlay */
.robot-warning-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000000;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 10vh 2rem 5vh 2rem;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.robot-warning-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.robot-warning-overlay:not(.hidden) {
  pointer-events: all;
}

.robot-warning-overlay .warning-text {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 60vh;
  overflow: hidden;
}

.robot-warning-overlay .warning-buttons {
  margin-top: 0;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease 0.5s;
  flex-shrink: 0;
}

.robot-warning-overlay .warning-buttons.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes buttonPulse {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.4);
  }
  50% { 
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.8);
  }
}

/* Robot reaction animations */
.robot-arm {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.robot-arm.zoom-touched {
  transform: scale(1.4);
  z-index: 1000;
}

.robot-arm:hover {
  filter: brightness(1.3) hue-rotate(15deg);
}

.robot-angry {
  filter: brightness(1.5) hue-rotate(30deg) saturate(1.5) !important;
}

.robot-very-angry {
  filter: brightness(2) hue-rotate(60deg) saturate(2) contrast(1.3) !important;
}

@keyframes robotShake {
  0%, 100% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(-2px) translateY(-1px); }
  50% { transform: translateX(2px) translateY(1px); }
  75% { transform: translateX(-1px) translateY(1px); }
}

@keyframes robotFrenzy {
  0%, 100% { transform: scale(1) rotate(0deg); }
  10% { transform: scale(1.05) rotate(-2deg); }
  20% { transform: scale(0.95) rotate(2deg); }
  30% { transform: scale(1.03) rotate(-1deg); }
  40% { transform: scale(0.98) rotate(1deg); }
  50% { transform: scale(1.02) rotate(-0.5deg); }
  60% { transform: scale(0.99) rotate(0.5deg); }
  70% { transform: scale(1.01) rotate(-0.2deg); }
  80% { transform: scale(1) rotate(0.2deg); }
  90% { transform: scale(1) rotate(-0.1deg); }
}

/* Animated warning text on hero */
.animated-warning {
  color: #ff6b6b !important;
  text-shadow: 
    0 0 10px rgba(255, 107, 107, 0.8),
    0 0 20px rgba(255, 107, 107, 0.6),
    0 0 30px rgba(255, 107, 107, 0.4) !important;
  font-weight: 900;
}

@keyframes warningPulse {
  0%, 100% { 
    transform: scale(1);
    opacity: 0.9;
  }
  50% { 
    transform: scale(1.02);
    opacity: 1;
  }
}

@keyframes textGlow {
  0% {
    text-shadow: 
      0 0 10px rgba(255, 107, 107, 0.8),
      0 0 20px rgba(255, 107, 107, 0.6),
      0 0 30px rgba(255, 107, 107, 0.4);
  }
  100% {
    text-shadow: 
      0 0 15px rgba(255, 107, 107, 1),
      0 0 25px rgba(255, 107, 107, 0.8),
      0 0 35px rgba(255, 107, 107, 0.6),
      0 0 45px rgba(255, 107, 107, 0.4);
  }
}

/* Mobile game mode adjustments */
@media (max-width: 768px) {
    .game-description {
        padding: 2rem 1rem;
    }
    
    .game-description h2 {
        font-size: 2rem;
    }
    
    .game-instructions {
        font-size: 1rem;
    }
    
    .game-stats {
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        min-width: 100px;
    }
    
    .clickable-arm.arm-hover::before {
        font-size: 0.7rem;
        padding: 0.3rem 0.8rem;
    }
}

/* Screen shake animation */
@keyframes screenShake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  10% { transform: translate(-2px, -1px) rotate(-0.5deg); }
  20% { transform: translate(2px, 1px) rotate(0.5deg); }
  30% { transform: translate(-1px, 2px) rotate(-0.5deg); }
  40% { transform: translate(1px, -2px) rotate(0.5deg); }
  50% { transform: translate(-2px, 1px) rotate(-0.5deg); }
  60% { transform: translate(2px, -1px) rotate(0.5deg); }
  70% { transform: translate(-1px, -2px) rotate(-0.5deg); }
  80% { transform: translate(1px, 2px) rotate(0.5deg); }
  90% { transform: translate(-2px, -1px) rotate(-0.5deg); }
}

.screen-shake {
  animation: screenShake 0.6s ease-in-out;
}

/* Floating Cogs Animation */
.floating-cogs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.cog {
  position: absolute;
  color: rgba(128, 128, 128, 0.4);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.cog svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 3px rgba(128, 128, 128, 0.2));
}

.cog-1 {
  width: 60px;
  height: 60px;
  top: 20%;
  left: 5%;
  animation: rotateCog 8s linear infinite;
}

.cog-2 {
  width: 80px;
  height: 80px;
  top: 60%;
  right: 8%;
  animation: rotateCog 6s linear infinite reverse;
}

.cog-3 {
  width: 45px;
  height: 45px;
  top: 40%;
  left: 85%;
  animation: rotateCog 10s linear infinite;
}

.cog-4 {
  width: 70px;
  height: 70px;
  bottom: 20%;
  left: 10%;
  animation: rotateCog 7s linear infinite reverse;
}

@keyframes rotateCog {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes float1 {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  25% { transform: translateY(-20px) translateX(10px); }
  50% { transform: translateY(0px) translateX(20px); }
  75% { transform: translateY(20px) translateX(10px); }
}

@keyframes float2 {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  33% { transform: translateY(15px) translateX(-15px); }
  66% { transform: translateY(-10px) translateX(-30px); }
}

@keyframes float3 {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  50% { transform: translateY(-30px) translateX(-40px); }
}

@keyframes float4 {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  20% { transform: translateY(-15px) translateX(25px); }
  40% { transform: translateY(10px) translateX(50px); }
  60% { transform: translateY(-5px) translateX(25px); }
  80% { transform: translateY(15px) translateX(0px); }
}

/* Hide cogs on mobile */
@media (max-width: 768px) {
  .floating-cogs {
    display: none;
  }
}

/* Paragraph side robot arms */
.about-text-centered {
  position: relative;
}

.paragraph-left {
  position: absolute;
  left: -250px;
  top: 50%;
  transform: translateY(-50%);
  width: 120px;
  height: 120px;
}

.paragraph-right {
  position: absolute;
  right: -250px;
  top: 50%;
  transform: translateY(-50%);
  width: 120px;
  height: 120px;
}

/* Responsive adjustments for paragraph arms */
@media (max-width: 1400px) {
  .paragraph-left {
    left: -180px;
    width: 100px;
    height: 100px;
  }
  
  .paragraph-right {
    right: -180px;
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 1200px) {
  .paragraph-left,
  .paragraph-right {
    display: none;
  }
}

/* Contact section robot arms */
.contact-grid {
  position: relative;
}

.contact-left {
  position: absolute;
  left: -150px;
  top: 50%;
  transform: translateY(-50%);
  width: 120px;
  height: 120px;
}

.contact-right {
  position: absolute;
  right: -150px;
  top: 50%;
  transform: translateY(-50%);
  width: 120px;
  height: 120px;
}

/* Responsive adjustments for contact arms */
@media (max-width: 1400px) {
  .contact-left {
    left: -100px;
    width: 100px;
    height: 100px;
  }
  
  .contact-right {
    right: -100px;
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 1200px) {
  .contact-left,
  .contact-right {
    display: none;
  }
}

/* Experience page robot arms */
.center-block {
  position: relative;
}

.experience-left {
  position: absolute;
  left: -150px;
  top: 30%;
  width: 120px;
  height: 120px;
}

.experience-right {
  position: absolute;
  right: -150px;
  top: 30%;
  width: 120px;
  height: 120px;
}

/* Projects page robot arms */
.projects-container {
  position: relative;
}

.projects-left {
  position: absolute;
  left: -150px;
  top: 100px;
  width: 120px;
  height: 120px;
}

.projects-right {
  position: absolute;
  right: -150px;
  top: 100px;
  width: 120px;
  height: 120px;
}

/* Contact form robot arms */
.contact-form-left {
  position: absolute;
  left: -150px;
  top: 50%;
  transform: translateY(-50%);
  width: 120px;
  height: 120px;
}

.contact-form-right {
  position: absolute;
  right: -150px;
  top: 50%;
  transform: translateY(-50%);
  width: 120px;
  height: 120px;
}

/* Responsive adjustments for experience and projects arms */
@media (max-width: 1400px) {
  .experience-left,
  .projects-left,
  .contact-form-left {
    left: -100px;
    width: 100px;
    height: 100px;
  }
  
  .experience-right,
  .projects-right,
  .contact-form-right {
    right: -100px;
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 1200px) {
  .experience-left,
  .experience-right,
  .projects-left,
  .projects-right,
  .contact-form-left,
  .contact-form-right {
    display: none;
  }
}

/* Experience page robot arms */
.experience-left {
  position: absolute;
  left: -200px;
  top: 20%;
  width: 120px;
  height: 120px;
}

.experience-right {
  position: absolute;
  right: -200px;
  top: 20%;
  width: 120px;
  height: 120px;
}

/* Projects page robot arms */
.projects-left {
  position: absolute;
  left: -200px;
  top: 100px;
  width: 120px;
  height: 120px;
}

.projects-right {
  position: absolute;
  right: -200px;
  top: 100px;
  width: 120px;
  height: 120px;
}

/* Responsive adjustments for experience and projects arms */
@media (max-width: 1400px) {
  .experience-left,
  .projects-left {
    left: -150px;
    width: 100px;
    height: 100px;
  }
  
  .experience-right,
  .projects-right {
    right: -150px;
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 1200px) {
  .experience-left,
  .experience-right,
  .projects-left,
  .projects-right {
    display: none;
  }
}
