/* ============================================================
  JonathanDickson PORTFOLIO — styles.css
   ============================================================ */

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

html { scroll-behavior: smooth; }

body {
  background: #0A0A0B;
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
  cursor: none;
}

::selection { background: #FF4D00; color: #000; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #0A0A0B; }
::-webkit-scrollbar-thumb { background: #FF4D00; border-radius: 2px; }

/* ─── Keyframe Animations ────────────────────────────────── */
@keyframes floatShape {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33%       { transform: translateY(-30px) rotate(5deg); }
  66%       { transform: translateY(15px) rotate(-3deg); }
}

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

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

@keyframes orbit {
  from { transform: rotate(0deg) translateX(100px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(100px) rotate(-360deg); }
}

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-33.33%); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%       { opacity: 0.8; transform: scale(1.05); }
}

@keyframes lineExpand {
  from { width: 0; }
  to   { width: 3rem; }
}

@keyframes scrollLine {
  0%   { top: -100%; }
  50%  { top: 100%; }
  100% { top: 100%; }
}

/* ─── Custom Cursor ──────────────────────────────────────── */
#cursor {
  position: fixed;
  top: 0; left: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #FF4D00;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: width 0.3s, height 0.3s;
}

#cursor-trail {
  position: fixed;
  top: 0; left: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,77,0,0.4);
  pointer-events: none;
  z-index: 9998;
}

@media (hover: none), (pointer: coarse) {
  #cursor,
  #cursor-trail {
    display: none;
  }
}

/* ─── Noise Overlay ──────────────────────────────────────── */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
  opacity: 0.03;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── Loader ─────────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  background: #0A0A0B;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1s ease 0.8s;
}

#loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-text {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #FF4D00;
  letter-spacing: 0.3em;
  animation: pulseGlow 1.5s ease infinite;
}

/* ─── Navigation ─────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.5s ease;
}

#nav.scrolled {
  background: rgba(10,10,11,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: #FF4D00;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: none;
}

.logo-short { display: none; }

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.3s;
  cursor: none;
}

.nav-links a:hover { color: #FF4D00; }

/* ─── Hamburger Button ───────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 110;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Mobile Nav ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .logo-full { display: none; }
  .logo-short { display: inline; }

  .nav-links {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,10,11,0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    z-index: 105;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: all;
  }

  .nav-links a { color: rgba(255,255,255,0.7); font-size: 1.25rem; }
  .nav-links a:hover { color: #FF4D00; }
}

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(2rem, 6vw, 6rem);
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image:
    linear-gradient(rgba(255,77,0,0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,77,0,0.5) 1px, transparent 1px);
  background-size: 80px 80px;
}

.hero-content { position: relative; z-index: 2; }

.hero-subtitle {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: #FF4D00;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-line {
  display: inline-block;
  width: 0;
  height: 1px;
  background: #FF4D00;
  animation: lineExpand 1.5s ease forwards;
}

.hero-title-wrap { margin: 2rem 0; }

.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: 800;
  line-height: 0.95;
  display: block;
}

.hero-title--white {
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title--orange {
  background: linear-gradient(135deg, #FF4D00, #FFB800);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Pixels Word Hover ───────────────────────────────────── */
#pixels-word {
  display: inline-block;
  cursor: default;
  -webkit-text-fill-color: transparent;
  background: linear-gradient(135deg, #FF4D00, #FFB800);
  -webkit-background-clip: text;
  background-clip: text;
}

.px-letter {
  display: inline-block;
  -webkit-text-fill-color: transparent;
  background: linear-gradient(135deg, #FF4D00, #FFB800);
  -webkit-background-clip: text;
  background-clip: text;
}

@keyframes px-jump {
  0%   { transform: translateY(0)     scaleY(1); }
  30%  { transform: translateY(-20px) scaleY(1.1); }
  55%  { transform: translateY(6px)   scaleY(0.92); }
  75%  { transform: translateY(-5px)  scaleY(1.04); }
  100% { transform: translateY(0)     scaleY(1); }
}

.px-letter.jumping {
  animation: px-jump 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.px-rest {
  display: inline-block;
}

.hero-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.15rem;
  color: rgba(255,255,255,0.45);
  max-width: 500px;
  line-height: 1.8;
  font-weight: 300;
}

.hero-cta { display: flex; gap: 1.5rem; margin-top: 2.5rem; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  padding: 1rem 2.5rem;
  text-decoration: none;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: none;
  display: inline-block;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.btn--primary { background: #FF4D00; color: #000; border: none; }
.btn--primary:hover { background: #FFB800; transform: translateY(-2px); }

.btn--outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
}
.btn--outline:hover { border-color: #FF4D00; color: #FF4D00; }

/* ─── Scroll Indicator ───────────────────────────────────── */
.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.5;
  transition: opacity 0.5s;
}

.scroll-indicator.hidden { opacity: 0; }

.scroll-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.15);
  position: relative;
  overflow: hidden;
}

.scroll-line-inner {
  position: absolute;
  top: -100%;
  width: 100%;
  height: 100%;
  background: #FF4D00;
  animation: scrollLine 2s ease-in-out infinite;
}

/* ─── Floating Shapes ────────────────────────────────────── */
.floating-shape {
  position: absolute;
  border-radius: 50%;
  animation: floatShape 8s ease-in-out infinite;
}

/* Hero shapes */
.hero .floating-shape:nth-child(1) {
  top: 10%; right: 15%; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,77,0,0.13), transparent);
  border: 1px solid rgba(255,77,0,0.08);
}
.hero .floating-shape:nth-child(2) {
  bottom: 20%; left: 5%; width: 200px; height: 200px;
  animation-delay: -3s;
  background: radial-gradient(circle, rgba(0,194,255,0.13), transparent);
  border: 1px solid rgba(0,194,255,0.08);
}
.hero .floating-shape:nth-child(3) {
  top: 40%; right: 40%; width: 150px; height: 150px;
  animation-delay: -6s;
  background: radial-gradient(circle, rgba(255,0,102,0.13), transparent);
  border: 1px solid rgba(255,0,102,0.08);
}

/* Contact shapes */
.contact-section .floating-shape:nth-child(1) {
  top: 10%; left: 20%; width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(255,77,0,0.13), transparent);
  border: 1px solid rgba(255,77,0,0.08);
}
.contact-section .floating-shape:nth-child(2) {
  bottom: 15%; right: 15%; width: 180px; height: 180px;
  animation-delay: -4s;
  background: radial-gradient(circle, rgba(0,194,255,0.13), transparent);
  border: 1px solid rgba(0,194,255,0.08);
}

/* Contact email reveal override */
.contact-email-wrap { overflow: visible; }

/* ─── Reveal Text ────────────────────────────────────────── */
.reveal-text {
  overflow: hidden;
  display: block;
}

.reveal-text .reveal-inner {
  display: block;
  transform: translateY(110%);
  opacity: 0;
  transition:
    transform 1s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.8s ease;
}

.reveal-text.visible .reveal-inner {
  transform: translateY(0);
  opacity: 1;
}

/* ─── Stats Section ──────────────────────────────────────── */
.stats-section {
  padding: 5rem clamp(2rem, 6vw, 6rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.stat-item { text-align: center; padding: 2rem 0; }

.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  color: #FF4D00;
  line-height: 1;
}

.stat-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 0.75rem;
}

/* ─── Skill Ticker ───────────────────────────────────────── */
.skill-ticker-wrap {
  overflow: hidden;
  padding: 3rem 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.skill-ticker {
  display: flex;
  gap: 3rem;
  animation: ticker 20s linear infinite;
  width: fit-content;
  will-change: transform;
  transform: translateZ(0);
}

.skill-item {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.3s;
}

.skill-item.highlighted { color: #FF4D00; }
.skill-item.dim { color: rgba(255,255,255,0.12); }

.skill-sep {
  margin: 0 1.5rem;
  color: rgba(255,255,255,0.08);
}

/* ─── Work Section ───────────────────────────────────────── */
.work-section { padding: 8rem clamp(2rem, 6vw, 6rem); }

.work-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 4rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: #FF4D00;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-top: 0.5rem;
}

.work-date {
  font-family: 'DM Sans', sans-serif;
  color: rgba(255,255,255,0.35);
  font-size: 0.95rem;
}

/* ─── Project Card ───────────────────────────────────────── */
.project-card {
  position: relative;
  display: grid;
  gap: 3rem;
  align-items: center;
  padding: 4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  opacity: 0;
  transform: translateY(80px);
  transition:
    opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card.visible { opacity: 1; transform: translateY(0); }
.project-card.even { grid-template-columns: 1fr 1.2fr; }
.project-card.odd  { grid-template-columns: 1.2fr 1fr; }

/* Visual block */
.project-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 800px;
  transition:
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.8s ease;
}

.project-card.even .project-visual { order: 1; }
.project-card.odd  .project-visual { order: 2; }

/* tilt handled by JS */

.project-visual-inner {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.project-visual-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-visual-inner img { transform: scale(1.05); }

.project-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Text block */
.project-text { padding: 2rem 0; }
.project-card.even .project-text { order: 2; }
.project-card.odd  .project-text { order: 1; }

.project-category {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.project-category-line {
  display: inline-block;
  width: 1.5rem;
  height: 1px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-category-line { width: 3rem; }

.project-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 1.5rem;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-title { transform: translateX(12px); }

.project-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.8;
  max-width: 400px;
  margin-bottom: 2rem;
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  opacity: 0.6;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-cta { opacity: 1; transform: translateX(8px); }

/* ─── About Section ──────────────────────────────────────── */
.about-section {
  padding: 8rem clamp(2rem, 6vw, 6rem);
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.about-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.about-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.9;
  font-weight: 300;
}

.about-desc--mt { margin-top: 1.5rem; }

.about-process { position: relative; padding-top: 2rem; }

.process-step {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.process-num {
  font-family: 'Syne', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  color: rgba(255,255,255,0.06);
  line-height: 1;
  min-width: 70px;
}

.process-step-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.process-step-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.35);
  font-weight: 300;
}

/* ─── Contact Section ────────────────────────────────────── */
.contact-section {
  padding: 8rem clamp(2rem, 6vw, 6rem);
  text-align: center;
  position: relative;
}

.contact-inner { position: relative; z-index: 2; }

.contact-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 800;
  line-height: 1.05;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.contact-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.15rem;
  color: rgba(255,255,255,0.4);
  max-width: 500px;
  margin: 0 auto 3rem;
  line-height: 1.8;
  font-weight: 300;
}

.contact-email {
  display: inline-block;
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  padding: 1.5rem 4rem;
  border: 2px solid #FF4D00;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: none;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.contact-email:hover {
  background: #FF4D00;
  color: #000;
  transform: translateY(-4px);
}

/* ─── Footer ─────────────────────────────────────────────── */
.footer {
  padding: 3rem clamp(2rem, 6vw, 6rem);
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.1em;
}

.footer-links { display: flex; gap: 2rem; }

.footer-links a {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.25);
  text-decoration: none;
  letter-spacing: 0.1em;
  transition: color 0.3s;
  cursor: none;
}

.footer-links a:hover { color: #FF4D00; }

/* ─── Utility ────────────────────────────────────────────── */
.text-orange { color: #FF4D00; }


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

  .skill-ticker { animation: none; }

  .reveal-text .reveal-inner {
    transform: none;
    opacity: 1;
    transition: none;
  }

  .floating-shape { animation: none; }
  .scroll-line-inner { animation: none; }
  .loader-text { animation: none; opacity: 1; }
}

/* ─── Media Queries ──────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-title { font-size: 3rem !important; }

  .project-card.even,
  .project-card.odd { grid-template-columns: 1fr !important; }

  .project-card.even .project-visual,
  .project-card.odd  .project-visual { order: 1; }

  .project-card.even .project-text,
  .project-card.odd  .project-text  { order: 2; }

  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
}
