@import url('https://fonts.googleapis.com/css2?family=Anton:wght@400&display=swap');

/* Reset and normalize */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* CSS Variables */
:root {
  /* Colors */
  --primary-color: #000000;
  --secondary-color: #333333;
  --background-color: #ffffff;
  --text-color: #000000;
  --accent-color: #0066ff;
  
  /* Typography */
  --heading-font: 'Arial', sans-serif;
  --body-font: 'Arial', sans-serif;
  
  /* Spacing */
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 32px;
  
  /* Breakpoints */
  --mobile: 480px;
  --tablet: 768px;
  --desktop: 1024px;
  
  /* Camera Offsets */
  --camera-offset-x: 0px;
  --camera-offset-y: 0px;

  /* Modal Depth */
  --modal-z: 1500px; /* Letters are implicitly around 1000px due to perspective, modal needs to be in front */
}

/* Prevent scrolling and ensure full viewport layout */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100vw;
  box-sizing: border-box;
}

body {
  position: relative;
  min-height: 100vh;
  width: 100vw;
  background: #fff;
  font-family: var(--body-font);
  color: var(--text-color);
  line-height: 1.6;
  font-size: 16px;
}

/* Canvas fills the viewport */
#background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  display: block;
}

/* Centered GOLDFINE text */
.landing-title {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
  margin-top: 20vh;
  font-size: 4rem;
  font-weight: bold;
  color: #333;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  transform-style: preserve-3d;
  perspective: 1000px;
  transform: translate3d(var(--camera-offset-x), var(--camera-offset-y), 0);
}

.landing-letter {
  position: relative;
  font-size: 10vw;
  font-family: 'Anton', 'Arial Black', Arial, sans-serif;
  font-weight: 400;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1;
  transform-origin: center center;
  transform: perspective(2000px) rotateX(60deg) rotateZ(19deg) scale(1.2) translateY(40%);
  margin: 0 1vw;
  user-select: none;
  z-index: 2;
  will-change: transform;
  backface-visibility: hidden;
  pointer-events: none;
}

.landing-letter::after {
  display: none;
}

/* Remove hover and active states */
.landing-letter:hover,
.landing-letter:active {
  transform: perspective(2000px) rotateX(60deg) rotateZ(19deg) scale(1.2) translateY(40%);
  box-shadow: none;
}

/* Adjust individual letter positions for perspective */
.landing-letter:nth-child(1)  { transform: perspective(2000px) rotateX(60deg) rotateZ(19deg) scale(1.2) translate3d(-12vw, -2vw, 0vw); }
.landing-letter:nth-child(2)  { transform: perspective(2000px) rotateX(60deg) rotateZ(19deg) scale(1.2) translate3d(-2vw, 2vw, 2vw); }
.landing-letter:nth-child(3)  { transform: perspective(2000px) rotateX(60deg) rotateZ(19deg) scale(1.2) translate3d(8vw, 6vw, 0vw); }
.landing-letter:nth-child(4)  { transform: perspective(2000px) rotateX(60deg) rotateZ(19deg) scale(1.2) translate3d(18vw, 2vw, -2vw); }
.landing-letter:nth-child(5)  { transform: perspective(2000px) rotateX(60deg) rotateZ(19deg) scale(1.2) translate3d(28vw, -2vw, 0vw); }
.landing-letter:nth-child(6) { transform: perspective(2000px) rotateX(60deg) rotateZ(19deg) scale(1.2) translateY(40%); }
.landing-letter:nth-child(7) { transform: perspective(2000px) rotateX(60deg) rotateZ(19deg) scale(1.2) translateY(40%); }
.landing-letter:nth-child(8) { transform: perspective(2000px) rotateX(60deg) rotateZ(19deg) scale(1.2) translateY(40%); }
.landing-letter:nth-child(even) {
  /* Removed for clarity, now handled by individual nth-child transforms */
}
.landing-letter:nth-child(odd) {
  /* Removed for clarity, now handled by individual nth-child transforms */
}

/* Links bar at the bottom */
.links-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 0 16px 0 rgba(0,0,0,0.04);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0 0.5rem 0;
  z-index: 5;
  gap: 2rem;
  font-family: 'Inter', 'Arial', sans-serif;
  font-size: 1.1rem;
}

/* Hide any extra sections by default */
.about-section, .modal-overlay {
  display: none !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: clamp(2.5rem, 10vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
}

p {
  margin-bottom: var(--spacing-md);
  font-size: clamp(1rem, 2vw, 1.125rem);
}

/* GOLDFINE Header */
header {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: var(--spacing-lg);
}

header h1 {
  text-transform: uppercase;
  text-align: center;
  transform-origin: center center;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) perspective(1200px) rotateX(60deg) rotateY(-10deg);
}

/* Portfolio Container */
.portfolio-container {
  display: flex !important;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: var(--spacing-lg);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  perspective: 1000px;
  transform-style: preserve-3d;
}

/* Hide main portfolio container on mobile */
@media (max-width: 768px) {
  .portfolio-container {
    overflow-x: scroll;
    position: relative;
    height: auto;
  }
  .portfolio-container .portfolio-element {
    margin-top: 0;
    width: auto;
    max-width: none;
    aspect-ratio: auto;
  }
  /* Move portfolio-link into contact-nav on mobile */
  .contact-nav {
    overflow-x: auto;
    white-space: nowrap;
  }
  .contact-nav .portfolio-link {
    display: inline-flex;
  }
}

/* Portfolio Element */
.portfolio-element {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 0;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  max-width: 400px;
  width: 100%;
  aspect-ratio: 1/1;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: auto;
  margin-top: 20vh;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 4;
  transform-style: preserve-3d;
  transform: translateZ(0);
}

.portfolio-element:hover {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3), 0 6px 12px rgba(0, 0, 0, 0.3);
  transform: translateZ(0) translateY(-5px);
}

.portfolio-preview-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* object-position will be controlled by JS */
  pointer-events: none;
  filter: grayscale(100%);
  transition: filter 0.5s ease-in-out;
}

.portfolio-element:hover .portfolio-preview-image {
  filter: grayscale(0%) contrast(120%);
}

/*
.portfolio-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  transition: transform 0.4s ease;
}

.portfolio-element:hover .portfolio-icon {
  transform: scale(1.2) rotate(5deg);
}
*/

.portfolio-element h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-md);
  color: var(--primary-color);
  font-weight: 600;
}

.portfolio-preview {
  font-size: 1rem;
  color: var(--secondary-color);
  margin-bottom: var(--spacing-md);
  opacity: 0.8;
}

.portfolio-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.tag {
  background-color: rgba(0, 102, 255, 0.1);
  color: var(--accent-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.portfolio-element:hover .tag {
  background-color: rgba(0, 102, 255, 0.2);
  transform: translateY(-2px);
}

/* About Section */
.about-section {
  padding: var(--spacing-lg);
  max-width: 800px;
  margin: 0 auto;
}

/* Contact/Navigation */
.contact-nav {
  position: fixed;
  bottom: var(--spacing-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm);
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  border-radius: 50px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.contact-nav a {
  color: #000;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  pointer-events: auto;
}

.contact-nav a:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.contact-nav a[href*="github"] i {
  color: #000;
  transition: color 0.3s, background 0.3s;
}
.contact-nav a[href*="github"]:hover i {
  color: #fff;
  background: #333;
  border-radius: 50%;
  padding: 6px;
}

.contact-nav a[href*="twitter"],
.contact-nav a[href*="x.com"] {
  /* fallback for both Twitter and X */
}
.contact-nav a[href*="twitter"] i,
.contact-nav a[href*="x.com"] i {
  color: #000;
  transition: color 0.3s, background 0.3s;
}
.contact-nav a[href*="twitter"]:hover i,
.contact-nav a[href*="x.com"]:hover i {
  color: #fff;
  background: #1DA1F2;
  border-radius: 50%;
  padding: 6px;
}

.contact-nav a[href*="x.com"] i {
  color: #000;
  transition: color 0.3s, background 0.3s;
}
.contact-nav a[href*="x.com"]:hover i {
  color: #fff;
  background: #222;
  border-radius: 50%;
  padding: 6px;
}

.contact-nav a[href*="linkedin"]:hover {
  color: #0077B5;
  background: #fff;
}

.contact-nav a[href*="mailto"]:hover {
  color: #EA4335;
  background: #fff;
}

.contact-nav .portfolio-link {
  display: none;
  color: #000;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.5rem;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  pointer-events: auto;
}

.contact-nav .portfolio-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(8px);
}

.modal-content {
  background-color: var(--background-color);
  padding: var(--spacing-lg);
  max-width: 800px;
  width: 90%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transform: scale(1);
  transition: transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-close {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-color);
  transition: all 0.3s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  color: var(--accent-color);
  background-color: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg);
}

.project-title {
  margin-bottom: var(--spacing-md);
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--primary-color);
  font-weight: 700;
}

.project-description {
  margin-bottom: var(--spacing-md);
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.6;
  color: var(--text-color);
}

.project-thumbnail {
  max-width: 100%;
  height: auto;
  margin-bottom: var(--spacing-md);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.project-thumbnail:hover {
  transform: scale(1.02);
}

.project-video {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-bottom: var(--spacing-md);
}

/* Project tags in modal */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.project-tags .tag {
  background-color: rgba(0, 102, 255, 0.1);
  color: var(--accent-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.project-tags .tag:hover {
  background-color: rgba(0, 102, 255, 0.2);
  transform: translateY(-2px);
}

/* Project features list */
.project-features {
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-md);
}

.project-features li {
  margin-bottom: var(--spacing-sm);
  position: relative;
  padding-left: var(--spacing-md);
}

.project-features li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    padding: var(--spacing-md);
    max-height: 95vh;
  }
  
  .project-title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
  }
  
  .project-description {
    font-size: clamp(0.875rem, 2vw, 1rem);
  }
}

/* Developer Controls Slider */
.dev-controls {
  position: fixed;
  bottom: 70px; /* Adjust as needed to be above other elements */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(250, 250, 250, 0.95);
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 1001;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Arial, sans-serif;
  font-size: 14px;
  color: #333;
}

.dev-controls input[type="range"] {
  cursor: pointer;
}

/*
.dev-controls label {
  font-weight: bold;
}
*/

/* Print Styles */
@media print {
  .contact-nav,
  .modal-overlay {
    display: none;
  }
  
  body {
    background-color: white;
  }
  
  .portfolio-element {
    break-inside: avoid;
  }
}

/* Override to show portfolio-link on small screens */
@media (max-width: 768px) {
  .contact-nav .portfolio-link {
    display: inline-flex !important;
  }
} 