/*
Theme Name: Creative Portfolio
Theme URI: 
Author: Graphic Designer
Author URI: 
Description: A custom, interactive portfolio theme for a creative technologist.
Version: 1.0
Text Domain: creative-portfolio
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@400;700;900&display=swap');

:root {
  /* Dark Mode (Default) */
  --bg-color: #111111;
  --surface-color: #333333; /* Dark Grey */
  --text-color: #EEEEEE; /* Light Grey */
  --primary-color: #6A47BF; /* Purple */
  --accent-color: #FFC431; /* Yellow */
  
  --text-accent: #FFC431; /* Used for text that needs contrast */
  --code-bg: #0d0d0d;
  --timeline-line: rgba(255,255,255,0.1);
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

[data-theme="light"] {
  --bg-color: #EEEEEE; /* Light Grey */
  --surface-color: #FFFFFF;
  --text-color: #333333; /* Dark Grey */
  --primary-color: #6A47BF; /* Purple */
  --accent-color: #FFC431; /* Yellow */
  
  --text-accent: #6A47BF; /* Purple text for better contrast on light backgrounds instead of yellow */
  --code-bg: #E0E0E0;
  --timeline-line: rgba(0,0,0,0.1);
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  background-color: var(--bg-color);
  z-index: 1000;
  border-bottom: 1px solid var(--surface-color);
  transition: padding 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  padding: 10px 0;
  background-color: var(--bg-color);
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-branding { flex-shrink: 0; margin-right: 30px; }
.site-branding .site-title a {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-color);
  letter-spacing: -1px;
}

.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation ul, .main-navigation div > ul {
  list-style: none;
  display: flex;
  gap: 30px;
  align-items: center;
}

.main-navigation a {
  color: var(--text-color);
  font-weight: 500;
  position: relative;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.main-navigation a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.main-navigation a:hover::after {
  width: 100%;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  margin-left: 20px;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  z-index: 1;
}

.hero-greeting {
  font-size: 1.2rem;
  color: var(--accent-color);
  margin-bottom: 10px;
  display: block;
  font-family: monospace;
}

.hero-title {
  font-size: 5rem;
  margin-bottom: 20px;
  line-height: 1.1;
  font-weight: 900;
}

.hero-title span {
  color: var(--primary-color);
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 40px;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--primary-color);
  color: #fff;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid var(--primary-color);
}

.btn:hover {
  background-color: transparent;
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(106, 71, 191, 0.2);
}

/* Portfolio Section */
.portfolio-section {
  padding: 100px 0;
}

.section-title {
  font-size: 4rem;
  text-transform: uppercase;
  letter-spacing: 5px;
  margin-bottom: 60px;
  text-align: left;
  color: var(--text-color);
  font-weight: 900;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 5px;
  background-color: var(--accent-color);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 40px;
}

.portfolio-item {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  background-color: var(--surface-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255,255,255,0.05);
}

.portfolio-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(106, 71, 191, 0.4);
  border-color: var(--primary-color);
}

.portfolio-thumbnail img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.5s ease;
  filter: grayscale(20%);
}

.portfolio-item:hover .portfolio-thumbnail img {
  transform: scale(1.05);
  filter: grayscale(0%);
}

.portfolio-content {
  padding: 25px;
}

.portfolio-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.portfolio-title a {
  color: var(--text-color);
}

.portfolio-title a:hover {
  color: var(--primary-color);
}

.portfolio-excerpt {
  font-size: 0.95rem;
  opacity: 0.7;
}

/* Showreel Section */
.showreel-section {
  padding: 100px 0;
  text-align: center;
}

.video-container {
  max-width: 800px;
  margin: 0 auto;
  aspect-ratio: 16/9;
  background-color: var(--surface-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--primary-color);
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}

.video-container:hover {
  box-shadow: 0 0 30px rgba(106, 71, 191, 0.4);
}

.play-button {
  font-family: monospace;
  font-size: 1.5rem;
  color: var(--accent-color);
}

/* Footer */
.site-footer {
  background-color: var(--surface-color);
  padding: 80px 0 30px;
  margin-top: 80px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 50px;
  margin-bottom: 60px;
}

.widget-title {
  font-size: 1.2rem;
  color: var(--text-color);
  margin-bottom: 25px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-widget ul {
  list-style: none;
}

.footer-widget ul li {
  margin-bottom: 12px;
}

.footer-widget ul li a {
  color: var(--text-color);
  opacity: 0.6;
}

.footer-widget ul li a:hover {
  color: var(--accent-color);
  opacity: 1;
}

.site-info {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 0.9rem;
  opacity: 0.5;
  font-family: monospace;
}

/* Code styled section like in reference */
.code-block-section {
  background-color: var(--code-bg);
  border-left: 3px solid var(--primary-color);
  padding: 30px;
  font-family: monospace;
  color: var(--text-color);
  overflow-x: auto;
  border-radius: 0 5px 5px 0;
  margin: 60px 0;
  font-size: 0.95rem;
  line-height: 1.8;
  white-space: pre-wrap;
}
.code-comment { color: #6A9955; }
.code-keyword { color: #569CD6; }
.code-string { color: #CE9178; }
.code-variable { color: #9CDCFE; }
.code-function { color: #DCDCAA; }
.code-tag { color: var(--primary-color); }
.code-attr { color: var(--text-accent); }

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }
  .section-title {
    font-size: 2.5rem;
  }
  
    .main-navigation {
      display: flex;
    }
    .site-header .container {
        flex-direction: column;
        gap: 15px;
    }
    .main-navigation ul, .main-navigation div > ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

}


/* Journey Scroll Bar */
.journey-bar-container {
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: transparent;
}
.journey-bar {
  height: 100%;
  width: 0%;
  background-color: var(--accent-color);
  box-shadow: 0 0 10px var(--accent-color);
  border-radius: 0 4px 4px 0;
}

/* Scroll Reveal Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Timeline/Journey Section */
.journey-section {
  padding: 100px 0;
}
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}
.timeline::after {
  content: "";
  position: absolute;
  width: 2px;
  background-color: var(--timeline-line);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}
.timeline-item {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
}
.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}
.timeline-item:nth-child(even) {
  left: 50%;
}
.timeline-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  right: -10px;
  background-color: var(--surface-color);
  border: 4px solid var(--primary-color);
  top: 15px;
  border-radius: 50%;
  z-index: 1;
  transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}
.timeline-item:nth-child(even) .timeline-dot {
  left: -10px;
}
.timeline-content {
  padding: 20px 30px;
  background-color: var(--surface-color);
  position: relative;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.timeline-item:hover .timeline-content {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 196, 49, 0.2);
  border-color: var(--accent-color);
}

.timeline-item:hover .timeline-dot {
  background-color: var(--accent-color);
  box-shadow: 0 0 15px var(--accent-color);
  transform: scale(1.2);
}
.timeline-date {
  color: var(--text-accent);
  font-family: monospace;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 10px;
}
.timeline-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .timeline::after { left: 31px; }
  .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
  .timeline-item:nth-child(odd) { text-align: left; }
  .timeline-item:nth-child(even) { left: 0%; }
  .timeline-dot { left: 21px !important; }
}

/* Canvas Background */
#interactive-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

/* Connect Section */
.connect-section {
  padding: 100px 0;

}

.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
  max-width: 900px;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--primary-color);
  font-size: 1.1rem;
  transition: transform 0.3s ease, color 0.3s ease;
}
.social-link:hover {
  color: var(--accent-color);
  transform: translateX(5px);
}
.social-link svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
.btn-glow {
  box-shadow: 0 0 30px rgba(106, 71, 191, 0.6);
  border-radius: 30px;
  padding: 15px 40px;
}

/* Skills Bar */
.skill-bar-container {
    margin-bottom: 20px;
}
.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-family: monospace;
    color: var(--text-color);
}
.skill-progress-bg {
    width: 100%;
    height: 10px;
    background: var(--surface-color);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}
.skill-progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 5px;
    width: 0; /* Animated by JS or CSS */
    transition: width 1.5s cubic-bezier(0.1, 0.5, 0.1, 1);
}
.skill-progress-bar.accent {
    background: var(--accent-color);
}
.cert-card {
    background: var(--surface-color);
    padding: 20px;
    border-left: 4px solid var(--accent-color);
    margin-bottom: 15px;
    border-radius: 4px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.cert-card:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 20px rgba(255, 196, 49, 0.2);
}

#inner-interactive-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none; /* Let clicks pass through to the page */
}

/* Custom Cursor */
@media (pointer: fine) {
    body, a, button, input, textarea, .portfolio-item {
        cursor: none !important;
    }
}
.custom-cursor-dot {
    position: fixed;
    top: -100px;
    left: -100px;
    width: 6px;
    height: 6px;
    background-color: var(--text-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 999999;
    transition: opacity 0.3s;
}
.custom-cursor-circle {
    position: fixed;
    top: -100px;
    left: -100px;
    width: 40px;
    height: 40px;
    border: 1.5px solid var(--text-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 999998;
    transition: width 0.3s, height 0.3s, background-color 0.3s, border-color 0.3s;
}
.custom-cursor-circle.hovered {
    width: 60px;
    height: 60px;
    background-color: var(--text-color);
    opacity: 0.1;
    border-color: transparent;
}


/* =========================================================
   WordPress Form Plugins Compatibility (Contact Form 7 & WPForms)
   This forces any injected forms to perfectly match the theme!
========================================================= */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea,
.wpforms-form input[type="text"],
.wpforms-form input[type="email"],
.wpforms-form textarea {
    width: 100% !important;
    padding: 15px !important;
    background: var(--bg-color) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-color) !important;
    border-radius: 5px !important;
    font-family: var(--font-body) !important;
    box-sizing: border-box !important;
    margin-bottom: 20px !important;
}

[data-theme="light"] .wpcf7-form input[type="text"],
[data-theme="light"] .wpcf7-form input[type="email"],
[data-theme="light"] .wpcf7-form textarea,
[data-theme="light"] .wpforms-form input[type="text"],
[data-theme="light"] .wpforms-form input[type="email"],
[data-theme="light"] .wpforms-form textarea {
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.wpcf7-form input[type="submit"],
.wpforms-form button[type="submit"] {
    background: var(--primary-color) !important;
    color: #fff !important;
    border: none !important;
    padding: 15px 30px !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    width: 100% !important;
    font-family: var(--font-body) !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

.wpcf7-form input[type="submit"]:hover,
.wpforms-form button[type="submit"]:hover {
    box-shadow: 0 0 20px rgba(106, 71, 191, 0.6) !important;
}

.wpcf7-form label,
.wpforms-form label {
    display: block !important;
    margin-bottom: 5px !important;
    color: var(--text-accent) !important;
    font-family: monospace !important;
    font-weight: normal !important;
}

/* Override Minimal Footer Padding */
.site-footer { padding: 20px 0 !important; text-align: center; }
.site-info { margin-top: 0 !important; }


/* Missing Inline Styles Restored */
.page-header { padding: 150px 0 50px; background-color: var(--primary-color); color: #fff; text-align: center; }
.page-title { font-size: 4rem; text-transform: uppercase; letter-spacing: 2px; }
.typed-cursor { font-size: 3rem; color: var(--accent-color); }


  /* Mobile Menu Styles */
  .mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    z-index: 1001;
  }
  .mobile-menu-toggle span {
    display: block;
    width: 30px;
    height: 2px;
    background-color: var(--text-color);
    transition: 0.3s;
  }
  
  @media (max-width: 768px) {
    .site-header .container {
        flex-direction: row;
        justify-content: space-between;
    }
    .mobile-menu-toggle {
        display: flex;
    }
    .main-navigation {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out, padding 0.3s ease;
        border-bottom: 1px solid transparent;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    .main-navigation.is-open {
        max-height: 500px;
        padding: 20px 0;
        border-bottom-color: var(--surface-color);
    }
    .main-navigation ul, .main-navigation div > ul {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    .theme-toggle {
        margin: 0;
    }
  }

/* Blog Grid Restored from blog.html */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 40px; }
.blog-card { background: var(--surface-color); border: 1px solid rgba(255,255,255,0.05); transition: transform 0.3s; }
.blog-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(106, 71, 191, 0.4); border-color: var(--primary-color); }
.blog-img { width: 100%; height: 200px; object-fit: cover; filter: grayscale(20%); }
.blog-card:hover .blog-img { filter: grayscale(0%); }
.blog-content { padding: 25px; }
.blog-category { color: var(--accent-color); font-family: monospace; font-size: 0.8rem; text-transform: uppercase; }
.blog-img-placeholder { font-family: var(--font-heading); font-size: 1.5rem; letter-spacing: 2px; }


/* Responsive Typing Header */
.typing-header {
    white-space: nowrap; /* Force one line */
    /* Removed display: flex to preserve whitespace */
}
@media (max-width: 768px) {
    .typing-header {
        font-size: 1.6rem !important;
        white-space: normal; /* Allow wrapping only if absolutely necessary, but font size is small enough to fit */
    }
    .typing-header .typed-text {
        font-size: 1.6rem !important;
    }
}
