/* 
* Dylan Pak Portfolio Website - Revised Version
* Main Stylesheet
*/

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600&family=Poppins:wght@400;500;600&display=swap');

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

/* Variables */
:root {
  /* Colors */
  --background: #121212;
  --primary: #6366F1;
  --secondary: #F97316;
  --success: #10B981;
  --failure: #EF4444;
  --text: #F9FAFB;
  --text-secondary: #9CA3AF;
  --dark-surface: #1F1F1F;
  
  /* Typography */
  --heading-font: 'Montserrat', sans-serif;
  --body-font: 'Inter', sans-serif;
  --accent-font: 'Poppins', sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;
  
  /* Transitions */
  --transition-fast: 0.3s ease;
  --transition-medium: 0.5s ease;
  --transition-slow: 0.8s ease;
}

/* Base Styles */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: 4rem;
}

h2 {
  font-size: 3rem;
}

h3 {
  font-size: 2rem;
  color: var(--primary);
}

h4 {
  font-size: 1.5rem;
}

p {
  margin-bottom: var(--spacing-sm);
}

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

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

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

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-md) 0;
}

.section {
  padding: var(--spacing-xl) 0;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section-title::after {
  content: '';
  display: block;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  margin-top: var(--spacing-sm);
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-family: var(--accent-font);
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background-color: #5254d4;
  color: var(--text);
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--text);
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.3);
}

.btn-secondary:hover {
  background-color: #ea6c10;
  color: var(--text);
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(249, 115, 22, 0.4);
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(18, 18, 18, 0.8);
  backdrop-filter: blur(10px);
  transition: all var(--transition-fast);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-family: var(--heading-font);
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--text);
  display: flex;
  align-items: center;
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: var(--spacing-md);
}

.nav-links a {
  font-family: var(--accent-font);
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.nav-links a:hover {
  color: var(--primary);
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
  color: var(--primary);
  background-color: rgba(99, 102, 241, 0.1);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background-color: var(--background);
  overflow: hidden;
}

.hero::before {
  content: 'Explore, Share, Inspire';
  position: absolute;
  font-size: 10rem;
  font-weight: 800;
  opacity: 0.03;
  white-space: nowrap;
  z-index: 1;
  transform: rotate(-10deg);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-title {
  font-size: 5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text);
}

.hero-subtitle {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
  color: var(--primary);
  font-family: var(--accent-font);
  font-weight: 600;
}

.hero-tagline {
  font-size: 1.2rem;
  margin-bottom: var(--spacing-lg);
  color: var(--text-secondary);
}

.hero-profile {
  position: absolute;
  right: 10%;
  top: 50%;
  transform: translateY(-50%);
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid var(--primary);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.hero-profile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  z-index: 2;
  color: var(--text-secondary);
}

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

/* Timeline Section */
.timeline-section {
  position: relative;
  padding: var(--spacing-xl) 0;
}

.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 4rem;
  width: 100%;
}

.timeline-item:nth-child(odd) .timeline-content {
  float: left;
  padding-right: 3rem;
  text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
  float: right;
  padding-left: 3rem;
  text-align: left;
}

.timeline-content {
  position: relative;
  width: 45%;
  padding: 1.5rem;
  background-color: var(--dark-surface);
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-medium);
}

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

.timeline-icon {
  position: absolute;
  top: 0;
  left: 50%;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--primary);
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translate(-50%, 0);
  z-index: 10;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

.timeline-icon i {
  font-size: 1.5rem;
  color: var(--text);
}

.timeline-title {
  margin-bottom: 1rem;
  color: var(--primary);
}

.timeline-item:nth-child(even) .timeline-title {
  color: var(--secondary);
}

.timeline-text {
  color: var(--text);
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* Journey Visualization */
.journey-visualization {
  position: relative;
  height: 400px;
  margin: 4rem 0;
  overflow: hidden;
}

.journey-path {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.journey-point {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--failure);
  z-index: 2;
}

.journey-point.success {
  background-color: var(--success);
}

.journey-label {
  position: absolute;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.journey-curve {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.failure-curve {
  stroke: var(--failure);
  stroke-width: 3;
  fill: none;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawPath 2s forwards ease-out;
}

.success-curve {
  stroke: var(--success);
  stroke-width: 3;
  fill: none;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawPath 2s 1s forwards ease-out;
}

@keyframes drawPath {
  to {
    stroke-dashoffset: 0;
  }
}

/* Failures Section */
.failures-section {
  background-color: var(--background);
  position: relative;
}

.failures-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.failure-card {
  background-color: var(--dark-surface);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-medium);
  border-top: 3px solid var(--failure);
}

.failure-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.failure-card:last-child {
  border-top: 3px solid var(--success);
}

.failure-title {
  color: var(--failure);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.failure-card:last-child .failure-title {
  color: var(--success);
}

.failure-text {
  color: var(--text);
}

/* Skills Section */
.skills-section {
  background-color: var(--background);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
}

.skill-category {
  background-color: var(--dark-surface);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-medium);
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.skill-category h3 {
  color: var(--primary);
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.5rem;
}

.skill-list {
  list-style: none;
}

.skill-item {
  margin-bottom: 0.8rem;
  color: var(--text);
  position: relative;
  padding-left: 1.5rem;
}

.skill-item::before {
  content: '•';
  color: var(--secondary);
  position: absolute;
  left: 0;
  font-size: 1.5rem;
  line-height: 1;
}

/* Ventures Section */
.ventures-section {
  background-color: var(--background);
}

.ventures-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.venture-card {
  background-color: var(--dark-surface);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-medium);
  text-align: center;
}

.venture-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.venture-title {
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.venture-description {
  color: var(--text);
  margin-bottom: 2rem;
}

.venture-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 2rem;
}

.venture-stat {
  text-align: center;
}

.venture-stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.venture-stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Philosophy Section */
.philosophy-section {
  background-color: var(--background);
  text-align: center;
}

.quote-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem;
  position: relative;
}

.quote-text {
  font-size: 2rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
  position: relative;
  z-index: 2;
}

.quote-container::before,
.quote-container::after {
  content: '"';
  font-family: Georgia, serif;
  font-size: 10rem;
  position: absolute;
  color: var(--primary);
  opacity: 0.1;
  line-height: 1;
}

.quote-container::before {
  top: 0;
  left: 0;
}

.quote-container::after {
  bottom: -4rem;
  right: 0;
  transform: rotate(180deg);
}

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

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info h3 {
  margin-bottom: 2rem;
}

.contact-text {
  margin-bottom: 2rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--dark-surface);
  color: var(--text);
  font-size: 1.5rem;
  transition: all var(--transition-fast);
}

.social-link:hover {
  background-color: var(--primary);
  color: var(--text);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.contact-form {
  background-color: var(--dark-surface);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--body-font);
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background-color: rgba(255, 255, 255, 0.08);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Footer */
.footer {
  background-color: var(--dark-surface);
  padding: 3rem 0;
  text-align: center;
}

.footer-text {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.back-to-top {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background-color: var(--primary);
  color: var(--text);
  border-radius: 50%;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

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

.back-to-top:hover {
  background-color: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(249, 115, 22, 0.3);
}

/* Custom Cursor */
.cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(99, 102, 241, 0.5);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background-color 0.2s;
  display: none;
}

.cursor-follower {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, border-color 0.2s, transform 0.1s;
  display: none;
}

.cursor.active {
  width: 10px;
  height: 10px;
  background-color: rgba(249, 115, 22, 0.8);
}

.cursor-follower.active {
  width: 30px;
  height: 30px;
  border-color: rgba(249, 115, 22, 0.5);
  transform: translate(-50%, -50%) scale(1.5);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 1s ease, transform 1s ease;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 1s ease, transform 1s ease;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .hero-profile {
    width: 250px;
    height: 250px;
  }
}

@media (max-width: 992px) {
  html {
    font-size: 14px;
  }
  
  .timeline::before {
    left: 30px;
  }
  
  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    float: right;
    padding-left: 3rem;
    padding-right: 1rem;
    text-align: left;
    width: calc(100% - 60px);
    margin-left: 60px;
  }
  
  .timeline-icon {
    left: 30px;
  }
  
  .failures-grid,
  .ventures-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-profile {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--dark-surface);
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .nav-links li {
    margin: 0.5rem 0;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.5rem;
  }
  
  .failures-grid,
  .ventures-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .journey-visualization {
    height: 300px;
  }
}

@media (max-width: 576px) {
  .container {
    width: 95%;
  }
  
  .section {
    padding: var(--spacing-lg) 0;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .quote-text {
    font-size: 1.5rem;
  }
  
  .timeline-content {
    padding: 1rem;
  }
  
  .timeline-icon {
    width: 40px;
    height: 40px;
  }
  
  .timeline-icon i {
    font-size: 1rem;
  }
}

/* For devices that support hover */
@media (hover: hover) {
  .cursor, .cursor-follower {
    display: block;
  }
}
