/* 
  hickoxyz - Professional Portfolio Theme
  A sophisticated dark editorial design
*/

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
  /* Color Palette - Warm Charcoal with Gold accents */
  --color-bg-primary: #0d0d0f;
  --color-bg-secondary: #151518;
  --color-bg-tertiary: #1c1c21;
  --color-bg-card: #1a1a1f;
  --color-bg-card-hover: #222228;
  
  --color-text-primary: #f0ebe3;
  --color-text-secondary: #a8a29e;
  --color-text-muted: #6b6862;
  
  --color-accent: #c9a227;
  --color-accent-hover: #e0b83a;
  --color-accent-muted: rgba(201, 162, 39, 0.12);
  
  --color-border: #2a2a30;
  --color-border-light: #3a3a42;
  
  /* Typography */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', Tahoma, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  
  /* Layout */
  --max-width: 1200px;
  --content-width: 800px;
  
  /* Animation */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(34, 211, 238, 0.1);
}

/* ============================================
   FONT IMPORTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Source+Sans+3:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Gradient background overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 0%, rgba(201, 162, 39, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(201, 162, 39, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 400;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  margin-bottom: var(--space-md);
}

h4 {
  font-size: 1.25rem;
  font-family: var(--font-body);
  font-weight: 600;
}

p {
  margin-bottom: var(--space-lg);
  color: var(--color-text-secondary);
}

p:last-child {
  margin-bottom: 0;
}

/* ============================================
   LINKS
   ============================================ */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* Underline animation for inline links */
.content-section p a,
.prose a {
  position: relative;
  padding-bottom: 2px;
}

.content-section p a::after,
.prose a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width var(--transition-base);
}

.content-section p a:hover::after,
.prose a:hover::after {
  width: 100%;
}

/* ============================================
   LAYOUT CONTAINERS
   ============================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container--narrow {
  max-width: var(--content-width);
}

.section {
  padding: var(--space-4xl) 0;
}

.section--hero {
  padding: var(--space-4xl) 0 var(--space-3xl);
  min-height: 60vh;
  display: flex;
  align-items: center;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13, 13, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) 0;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.nav__brand {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-text-primary);
  letter-spacing: 0.02em;
  transition: color var(--transition-fast);
}

.nav__brand:hover {
  color: var(--color-accent);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width var(--transition-base);
}

.nav__link:hover {
  color: var(--color-text-primary);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__link--active {
  color: var(--color-accent);
}

/* Mobile menu toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav__toggle-bar {
  width: 100%;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

/* Mobile nav styles */
@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }
  
  .nav__menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: var(--space-4xl) var(--space-xl);
    gap: var(--space-lg);
    background: var(--color-bg-secondary);
    border-left: 1px solid var(--color-border);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
  }
  
  .nav__menu.is-open {
    transform: translateX(0);
  }
  
  .nav__menu::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 280px;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base);
  }
  
  .nav__menu.is-open::before {
    opacity: 1;
    visibility: visible;
  }
  
  .nav__link {
    font-size: 1rem;
    padding: var(--space-sm) 0;
  }
  
  /* Hamburger animation */
  .nav__toggle.is-active .nav__toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  
  .nav__toggle.is-active .nav__toggle-bar:nth-child(2) {
    opacity: 0;
  }
  
  .nav__toggle.is-active .nav__toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  text-align: center;
  padding: var(--space-4xl) 0;
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.1s;
}

.hero__title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.2s;
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 300;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2xl);
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.3s;
}

.hero__location {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.4s;
}

.hero__location::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
}

/* ============================================
   SLIDESHOW / GALLERY
   ============================================ */
.gallery {
  position: relative;
  max-width: 700px;
  margin: var(--space-3xl) auto;
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  animation-delay: 0.5s;
}

.gallery__container {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-bg-secondary);
  box-shadow: var(--shadow-lg);
}

.gallery__slide {
  display: none;
  position: relative;
}

.gallery__slide.is-active {
  display: block;
  animation: fadeIn 0.6s ease;
}

.gallery__image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}

.gallery__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-lg);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: var(--color-text-primary);
  font-size: 0.875rem;
}

.gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--color-text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: blur(4px);
}

.gallery__nav:hover {
  background: rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.2);
}

.gallery__nav--prev {
  left: var(--space-md);
}

.gallery__nav--next {
  right: var(--space-md);
}

.gallery__dots {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-lg) 0;
}

.gallery__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border-light);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.gallery__dot:hover,
.gallery__dot.is-active {
  background: var(--color-accent);
  transform: scale(1.2);
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */
.content-section {
  padding: var(--space-3xl) 0;
}

.content-section__header {
  margin-bottom: var(--space-2xl);
}

.content-section__title {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-md);
}

.content-section__title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--color-accent);
}

.prose {
  color: var(--color-text-secondary);
  font-size: 1.0625rem;
  line-height: 1.8;
}

.prose p + p {
  margin-top: var(--space-lg);
}

.prose strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

/* ============================================
   TIMELINE SCROLL WIDGET
   ============================================ */
.timeline-scroll {
  position: fixed;
  left: calc(50% - min(var(--content-width) / 2, 50vw - var(--space-xl)) - 8rem);
  top: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.timeline-scroll.is-visible {
  opacity: 1;
  visibility: visible;
}

.timeline-scroll__track {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-border);
}

.timeline-scroll__progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--color-accent);
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-scroll__markers {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.timeline-scroll__marker {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  cursor: pointer;
  transition: transform 0.2s ease;
  position: relative;
}

.timeline-scroll__marker:hover {
  transform: translateX(2px);
}

/* Dot on the line */
.timeline-scroll__marker::before {
  content: '';
  position: absolute;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  transform: translateX(-50%);
  transition: all 0.3s ease;
}

.timeline-scroll__marker.is-passed::before {
  background: var(--color-text-muted);
  border-color: var(--color-text-muted);
}

.timeline-scroll__marker.is-active::before {
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: 0 0 8px rgba(201, 162, 39, 0.4);
  transform: translateX(-50%) scale(1.3);
}

.timeline-scroll__year {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 400;
  font-style: italic;
  color: var(--color-text-muted);
  margin-left: 1rem;
  transition: color 0.3s ease;
}

.timeline-scroll__label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-text-muted);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.timeline-scroll__marker:hover .timeline-scroll__label,
.timeline-scroll__marker.is-active .timeline-scroll__label {
  opacity: 1;
  transform: translateX(0);
}

.timeline-scroll__marker.is-active .timeline-scroll__year {
  color: var(--color-accent);
}

.timeline-scroll__marker.is-active .timeline-scroll__label {
  color: var(--color-text-secondary);
}

.timeline-scroll__marker.is-passed .timeline-scroll__year {
  color: var(--color-text-secondary);
}

/* Hide on smaller screens */
@media (max-width: 1100px) {
  .timeline-scroll {
    display: none;
  }
}

/* ============================================
   ABOUT PAGE
   ============================================ */
.about-intro {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-xl);
}

.about-intro__header {
  margin-bottom: var(--space-2xl);
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.about-intro__title {
  font-style: italic;
}

.about-content {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.2s;
}

.about-content p {
  font-size: 1.0625rem;
  margin-bottom: var(--space-xl);
}

/* Company/role highlights */
.company-link {
  font-weight: 500;
  color: var(--color-text-primary);
}

/* ============================================
   SOCIAL LINKS
   ============================================ */
.social-links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  padding: var(--space-2xl) 0;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.4s;
}

.social-links__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 1.25rem;
  transition: all var(--transition-base);
}

.social-links__item:hover {
  background: var(--color-accent-muted);
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* ============================================
   PROJECTS GRID
   ============================================ */
.projects-header {
  text-align: center;
  padding: var(--space-4xl) 0 var(--space-2xl);
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.projects-header__title {
  font-style: italic;
  margin-bottom: var(--space-md);
}

.projects-header__subtitle {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--space-xl);
  padding: 0 var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto var(--space-4xl);
}

@media (max-width: 480px) {
  .projects-grid {
    grid-template-columns: 1fr;
    padding: 0 var(--space-md);
  }
}

/* ============================================
   PROJECT CARDS
   ============================================ */
.project-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-xl);
  transition: all var(--transition-base);
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.15s; }
.project-card:nth-child(3) { animation-delay: 0.2s; }
.project-card:nth-child(4) { animation-delay: 0.25s; }
.project-card:nth-child(5) { animation-delay: 0.3s; }
.project-card:nth-child(6) { animation-delay: 0.35s; }
.project-card:nth-child(7) { animation-delay: 0.4s; }
.project-card:nth-child(8) { animation-delay: 0.45s; }

.project-card:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-card__header {
  margin-bottom: var(--space-md);
}

.project-card__title {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.project-card__tagline {
  font-size: 0.9375rem;
  color: var(--color-accent);
  font-weight: 400;
}

.project-card__date {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.project-card__description {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
}

.project-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: auto;
}

.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.project-card__link:hover {
  background: var(--color-accent-muted);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.project-card__license {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: var(--space-md);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
}

.footer__content {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer__text {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.footer__text:last-child {
  margin-bottom: 0;
}

.footer__link {
  color: var(--color-text-secondary);
}

.footer__link:hover {
  color: var(--color-accent);
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }

.mt-0 { margin-top: 0; }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* Divider */
.divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--color-border-light),
    transparent
  );
  margin: var(--space-2xl) 0;
}

/* Code/samp styling */
samp, code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-bg-tertiary);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--color-accent);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
  :root {
    --space-4xl: 4rem;
    --space-3xl: 3rem;
  }
  
  .container {
    padding: 0 var(--space-md);
  }
  
  .hero__title {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }
  
  .about-intro {
    padding: var(--space-2xl) var(--space-md);
  }
  
  .gallery__nav {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  
  .social-links {
    gap: var(--space-md);
  }
  
  .social-links__item {
    width: 44px;
    height: 44px;
  }
}
