/*================================
  Theme Variables
================================*/
:root {
    /* Brick red for highlights */
    --raw-highlight: #B04E23;
    /* Light text for contrast on red */
    --raw-contrast: #ecf0f1;
    /* Dark background fallback */
    --bg-dark: #2c3e50;
    /* Light background fallback */
    --bg-light: #ffffff;
  }
  
  /*================================
    General styles (Dark Mode)
  ================================*/
  body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    background: url('../images/background-brick.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--raw-contrast);
    font-size: 1.1em;
    position: relative;
    z-index: 0;
  }
  
  /* Dark overlay */
  #overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
  }
  
  /* CSS‐only Smoke Effect */
  body::after {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-image: radial-gradient(
      ellipse at center,
      rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%
    );
    background-repeat: repeat;
    background-size: 300% 300%;
    opacity: 0.2;
    pointer-events: none;
    animation: smokeFloat 60s linear infinite;
    z-index: -2;
  }
  @keyframes smokeFloat {
    from { background-position: 0 0; }
    to   { background-position: 2000px 2000px; }
  }
  
  /*================================
    Light‐Theme Overrides
  ================================*/
  body.light-theme {
    background: var(--bg-light) !important;
    color: #333 !important;
  }
  body.light-theme #overlay,
  body.light-theme::after {
    display: none !important; /* hide overlay & smoke */
  }
  body.light-theme header {
    background-color: var(--bg-light) !important;
  }
  body.light-theme header nav ul li a {
    color: #333 !important;
  }
  /* Ensure the color‐line shows in light mode */
  body.light-theme header .color-line {
    display: block !important;
    background: var(--raw-highlight) !important;
  }
  
  /*================================
    Header & Navigation
  ================================*/
  header {
    background-color: #34495e;
    padding: 10px 0;
    text-align: center;
    position: relative;
  }
  header nav ul {
    list-style: none;
    margin: 0; padding: 0;
  }
  header nav ul li {
    display: inline-block;
    margin: 0 15px;
  }
  header nav ul li a {
    color: var(--raw-contrast);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    transition: color 0.3s;
  }
  /* Color‐line below header */
  header .color-line {
    height: 5px;
    background: var(--raw-highlight);
    margin: 10px 0;
  }
  
  /* Theme toggle button */
  #theme-toggle {
    position: absolute;
    top: 8px; right: 20px;
    background: none; border: none;
    font-size: 1.5em; cursor: pointer;
    color: var(--raw-contrast);
    transition: color 0.3s;
  }
  #theme-toggle.light-theme {
    color: #333;
  }
  
  /*================================
    Fade‐In Utility
  ================================*/
  .fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
  }
  .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }
  
  /*================================
    Intro Section
  ================================*/
  .intro {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
    flex-wrap: wrap;
  }
  .intro img {
    width: 300px; height: 300px;
    border-radius: 50%;
    margin-left: 30px;
    opacity: 0;
    animation: fadeIn 2s forwards;
  }
  .intro-text {
    max-width: 600px;
    margin-right: 30px;
    text-align: left;
  }
  .intro-text h1, .intro-text p {
    opacity: 0;
    animation: fadeIn 2s forwards;
  }
  @keyframes fadeIn { to { opacity: 1; } }
  .social-icons {
    margin-top: 20px;
    text-align: left;
  }
  .social-icons a { margin-right: 10px; }
  .social-icons img {
    width: 30px; height: 30px;
    opacity: 0;
    animation: fadeIn 2s forwards;
  }
  
  /*================================
    Section Headings
  ================================*/
  section {
    padding: 50px;
    border-bottom: 1px solid #34495e;
  }
  .section-heading {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
    color: var(--raw-highlight);
  }
  body.light-theme .section-heading {
    color: var(--raw-highlight);
  }
  
  /*================================
    Tabs (Skills, Experience, Projects)
  ================================*/
  .tab-container {
    display: flex;
    flex-wrap: wrap;
  }
  .tab-menu {
    flex: 1;
    padding-right: 20px;
    border-right: 1px solid #34495e;
    text-align: left;
  }
  .tab-content-container {
    flex: 3;
    padding-left: 20px;
  }
  
  .tab-menu li {
    font-size: 1.1em;
    margin: 8px 0;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  .tab-menu li.active {
    background-color: var(--raw-highlight);
    color: var(--raw-contrast);
  }
  .tab-menu li:hover {
    background-color: var(--raw-highlight);
  }
  
  /* Light‐theme tabs */
  body.light-theme .tab-menu li {
    background-color: #e0e0e0;
    color: #333;
  }
  body.light-theme .tab-menu li.active {
    background-color: var(--raw-highlight);
    color: var(--raw-contrast);
  }
  body.light-theme .tab-menu li:hover {
    background-color: var(--raw-highlight);
    color: var(--raw-contrast);
  }
  
  .tab-content {
    display: none;
  }
  .tab-content.active {
    display: block;
  }
  .tab-content h3 {
    color: var(--raw-highlight);
  }
  body.light-theme .tab-content h3 {
    color: var(--raw-highlight);
  }
  
  /* Fade animation for tab content */
  .fade-tab {
    animation: fadeInTab 0.8s ease forwards;
  }
  @keyframes fadeInTab {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  
  /*================================
    Contact & Footer
  ================================*/
  #contact a {
    color: var(--raw-highlight);
    text-decoration: none;
    transition: color 0.3s;
  }
  #contact a:hover {
    text-decoration: underline;
  }
  body.light-theme #contact a {
    color: var(--raw-highlight);
  }
  .contact-icon {
    width: 20px; height: 20px;
    margin-right: 10px;
    vertical-align: middle;
  }
  
  footer {
    background-color: #34495e;
    padding: 10px 0;
    text-align: center;
  }
  footer p {
    margin: 0; font-size: 1.1em;
  }
  body.light-theme footer {
    background-color: var(--bg-light);
  }
  
  /*================================
    Smooth scroll
  ================================*/
  html {
    scroll-behavior: smooth;
  }
  
  /*================================
    Mobile (<768px)
  ================================*/
  @media (max-width: 768px) {
    .intro { padding: 20px; }
    .intro img {
      width: 150px; height: 150px;
      margin-left: 0; margin-top: 20px;
    }
    .intro-text { text-align: center; margin-right: 0; }
    .social-icons { text-align: center; }
    .social-icons img { width: 20px; height: 20px; }
  
    .tab-container {
      flex-direction: column; padding: 10px;
    }
    .tab-menu {
      border-right: none;
      border-bottom: 1px solid #34495e;
      text-align: center;
    }
    .tab-content-container { padding-left: 0; }
    .tab-menu li {
      font-size: 1.1em; padding: 8px 10px; margin: 5px 0;
    }
    .tab-content { padding: 10px; }
  
    .section-heading {
      font-size: 1.8em;
    }
  }

 /* Projects section links match header color */
#projects a {
    color: var(--raw-highlight);      /* Brick-red accent */
    text-decoration: underline;
  }
  
  #projects a:hover {
    color: var(--raw-contrast);       /* Light text on hover for feedback */
  }
  
  /* In light theme, keep them visible */
  body.light-theme #projects a {
    color: var(--raw-highlight);      /* Same brick-red on white */
  }
  
  /* Move theme-toggle down on mobile so it sits just above the color-line */
@media (max-width: 768px) {
    #theme-toggle {
      top: 50px;    /* adjust this value until it sits right above the line */
    }
  }
  
  