/* =============================================
   DESIGN SYSTEM - Dylan Forde Personal Website
   Rugged Paper + Neon Gradients Aesthetic
   ============================================= */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Paper Colors */
  --paper-light: #f8f5ef;
  --paper-medium: #f0ebe0;
  --paper-dark: #e8e0d0;
  --paper-shadow: #d5cdc0;

  /* Neon Gradient Colors */
  --neon-cyan: #00e5ff;
  --neon-blue: #0080ff;
  --neon-purple: #8b5cf6;
  --neon-orange: #ff6b35;
  --neon-pink: #ff0080;

  /* Text Colors */
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #6b6b6b;
  --text-on-gradient: #ffffff;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-orange) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-purple) 100%);
  --gradient-accent: linear-gradient(135deg, var(--neon-orange) 0%, var(--neon-pink) 100%);

  /* Shadows & Glows */
  --glow-cyan: 0 0 20px rgba(0, 229, 255, 0.4);
  --glow-orange: 0 0 20px rgba(255, 107, 53, 0.4);
  --glow-combined: 0 0 30px rgba(0, 229, 255, 0.3), 0 0 60px rgba(255, 107, 53, 0.2);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 8px 40px rgba(0, 0, 0, 0.12);
  --shadow-paper: 0 2px 8px rgba(0, 0, 0, 0.06);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 8rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--paper-light);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Paper Texture Background ---------- */
.paper-bg {
  position: relative;
  background-color: var(--paper-light);
  background-image:
    /* Stronger grain texture */
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.06'/%3E%3C/svg%3E"),
    /* Fine speckle overlay */
    url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='dots'%3E%3CfeTurbulence baseFrequency='0.8' numOctaves='2' result='noise'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23dots)' opacity='0.03'/%3E%3C/svg%3E"),
    /* Paper gradient - warmer tones */
    linear-gradient(175deg,
      #faf7f2 0%,
      #f5f0e6 40%,
      #ebe4d4 100%);
  background-attachment: fixed;
}

/* Subtle edge darkening for depth */
.paper-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 50%, rgba(139, 119, 101, 0.04) 100%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

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

a {
  color: var(--text-primary);
  text-decoration: none;
  background: linear-gradient(to right, var(--neon-blue), var(--neon-cyan));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size var(--transition-normal), color var(--transition-normal);
}

a:hover {
  background-size: 100% 2px;
  color: var(--text-primary);
}

/* ---------- Neon Gradient Text ---------- */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Gradient Box - inverted style with gradient background */
.gradient-box {
  background: var(--gradient-primary);
  -webkit-text-fill-color: white;
  color: white;
  padding: 0.1em 0.4em;
  border-radius: 0.15em;
  display: inline-block;
  line-height: 1.2;
}

.gradient-text-secondary {
  background: var(--gradient-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 15px rgba(0, 128, 255, 0.2));
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
  z-index: 1;
}

.container-narrow {
  max-width: 800px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--text-on-gradient);
  box-shadow: var(--glow-combined);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.5), 0 0 80px rgba(255, 107, 53, 0.3);
  color: var(--text-on-gradient);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
  border: 2px solid transparent;
  background-clip: padding-box;
  position: relative;
}

.btn-secondary::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  z-index: -1;
  opacity: 0.5;
  transition: opacity var(--transition-normal);
}

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

.btn-secondary:hover::before {
  opacity: 1;
}

/* ---------- Cards ---------- */
.card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow:
    var(--shadow-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(200, 190, 175, 0.3);
  transition: all var(--transition-normal);
  position: relative;
}

/* Subtle paper texture on cards */
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='cardnoise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23cardnoise)' opacity='0.02'/%3E%3C/svg%3E");
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow:
    var(--shadow-medium),
    0 0 30px rgba(0, 229, 255, 0.08);
}

.card-neon {
  position: relative;
  overflow: hidden;
}

.card-neon::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-lg) + 2px);
  background: var(--gradient-primary);
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.card-neon:hover::before {
  opacity: 0.15;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
  background: rgba(248, 245, 239, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all var(--transition-normal);
}

.nav.scrolled {
  padding: var(--space-sm) 0;
  box-shadow: var(--shadow-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.nav-link {
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: var(--space-xs) 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-normal);
}

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

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  width: 100%;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-sm);
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

/* ---------- Hero Section ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  max-width: 800px;
}

.hero-title {
  margin-bottom: var(--space-sm);
}

/* Tighter spacing between title lines */
.hero-title+.hero-title {
  margin-top: -0.25rem;
  margin-bottom: var(--space-lg);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* Floating gradient orbs - Subtle ambient glow */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.08;
  animation: float 25s ease-in-out infinite;
  pointer-events: none;
}

.hero-orb-1 {
  width: 350px;
  height: 350px;
  background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-orange) 100%);
  top: -80px;
  right: -80px;
  animation-delay: 0s;
}

.hero-orb-2 {
  width: 280px;
  height: 280px;
  background: var(--neon-orange);
  bottom: -40px;
  left: -40px;
  animation-delay: -12s;
}

.hero-orb-3 {
  width: 180px;
  height: 180px;
  background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-orange) 100%);
  top: 45%;
  left: 8%;
  animation-delay: -6s;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(20px, -30px) scale(1.1);
  }

  50% {
    transform: translate(-10px, 20px) scale(0.95);
  }

  75% {
    transform: translate(30px, 10px) scale(1.05);
  }
}

/* ---------- Section Styles ---------- */
.section {
  padding: var(--space-2xl) 0;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-subtitle {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- Skills/Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: rgba(0, 229, 255, 0.1);
  color: var(--neon-blue);
  border: 1px solid rgba(0, 229, 255, 0.2);
}

.tag-gradient {
  background: var(--gradient-primary);
  color: var(--text-on-gradient);
  border: none;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ---------- Timeline (Resume) ---------- */
.timeline {
  position: relative;
  padding-left: var(--space-xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gradient-primary);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-xl);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-xl) + 4px);
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gradient-primary);
  box-shadow: var(--glow-cyan);
}

.timeline-date {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--neon-blue);
  margin-bottom: var(--space-xs);
}

.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: var(--space-xs);
}

.timeline-company {
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.timeline-content ul {
  list-style: none;
  padding: 0;
}

.timeline-content li {
  position: relative;
  padding-left: var(--space-md);
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.timeline-content li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--neon-orange);
}

/* ---------- Grid Layouts ---------- */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ---------- Footer ---------- */
.footer {
  padding: var(--space-xl) 0;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
  list-style: none;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--neon-cyan);
}

.footer-link svg {
  width: 20px;
  height: 20px;
}

.footer-copy {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

.delay-4 {
  animation-delay: 0.4s;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(248, 245, 239, 0.98);
    padding: var(--space-lg);
    gap: var(--space-md);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding-top: calc(var(--space-2xl) + 60px);
  }

  .hero-orb {
    opacity: 0.2;
  }

  .timeline {
    padding-left: var(--space-lg);
  }

  .timeline::before {
    left: 4px;
  }

  .timeline-item::before {
    left: calc(-1 * var(--space-lg) + 1px);
    width: 10px;
    height: 10px;
  }
}

/* ---------- Utility Classes ---------- */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-sm {
  margin-top: var(--space-sm);
}

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

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

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

.mb-sm {
  margin-bottom: var(--space-sm);
}

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

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

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}