body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #444444;  Text color for contrast 
}

.hover-area {
    position: relative;
    height: 100vh;
}

.hidden-header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #005f99;
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.hover-area:hover .hidden-header {
    opacity: 1;
    visibility: visible;
}

header {
    background-color: #005f99;
    color: #DDDDDD;
    padding: 10px 0;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 500;
}

nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 0;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: #DDDDDD;
    text-decoration: none;
}

nav a:hover {
    color: #002A5F;
    text-decoration: underline; 
}

nav ul li a {
    color: #DDDDDD;
    text-decoration: none;
    padding: 5px 10px; /* Add padding for hover area */
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    color: #FFFFFF; /* Just brighten the text */
}

/* Media query for smaller screens */
@media (max-width: 412px) {
    nav ul {
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center items */
    }

    nav ul li {
        margin: 5px 0; /* Adjust margin for vertical layout */
    }
}

.hero {
    width: 100%;
    background-size: cover;
    background-position: center;
    background-image: url('/assets/images/background2.jpg');
    background-attachment: scroll;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    /*background-attachment: fixed;*/
    min-height: 100vh; /* Ensures background covers full viewport */
    background-position: bottom center;
    color: #444444;  Text color for contrast 
    justify-content: center;
    margin: 0 ;
    padding: 0;
}

.hero-video {
    width: 100%;
    height: auto;
    object-fit: cover;
    z-index: 0;
}

.hero.no-background {
    background-image: none; 
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.hero-content {
    width: 100%;
    color: #888888;  Text color for contrast 
    position: relative;
    z-index: 1;
}

@media (max-width: 412px) {
    .hero .dark-header {
        color: #777777; /* Lighter text color for smaller screens */
    }
}

@media (orientation: portrait) {
    .hero-video {
        width: 100%; /* Ensure the video fits within the screen width */
        height: auto; /* Maintain aspect ratio */
    }
}


.btn {
    display: inline-block;
    padding: 10px 20px;
    margin-top: 20px;
    background-color: #005f99;
    color: #DDDDDD;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #004080;
}

.topics {
    width: 100%;
    padding: 40px 20px;
    margin: 20 auto;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.topic-list {
    display: block;
    flex-wrap: wrap;
    gap: 20px;
}

.topic {
    flex: 1 1 calc(50% - 40px); 
    background-color: #005f99;
    padding: 20px;
    border-radius: 5px;
    transition: transform 0.3s ease; 
    color: #DDDDDD; 
    margin: 20px auto; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 
}

.topic:hover {
    transform: translateY(-10px);
}

.inverse {
    background-color: #DDDDDD; 
    color: #005f99;
}

footer {
    width: 100%;
    text-align: center;
    padding: 20px 0;
    background-color: #005f99;
    color: #DDDDDD;
}

section {
    margin: 0 auto;
    width: 100%;
}

.topic a {
    color: #DDDDDD; 
    text-decoration: none; 
}

.topic a:hover{
    color: #CCCCCC; 
    text-decoration: underline; 
}

.topic a:visited{
    color: #B0B0B0; 
}

.topic a:active{
    color: #888888; 
}

.topic.inverse a {
    color: #003F7F; 
    text-decoration: none; 
}

.topic.inverse a:hover{
    color: #002A5F;
    text-decoration: underline; 
}

.topic.inverse a:visited{
    color: #002A5F; 
}

.topic.inverse a:active{
    color: #002A5F; 
}

h1, h2, h3, h4, h5, h6 {
    color: #005f99;
    margin: 0 0 10px; 
    font-weight: bold; 
}

.dark-header {
    color: #777777;
}

.topic h1, .topic h2, .topic h3, .topic h4, .topic h5, .topic h6 {
    color: #DDDDDD; /* Match the link color in .topic */
}

.topic.inverse h1, .topic.inverse h2, .topic.inverse h3, .topic.inverse h4, .topic.inverse h5, .topic.inverse h6 {
    color: #005f99; /* Match the inverse link color */
}

h1 {
    font-size: 2.5em; 
}

h2 {
    font-size: 2em; 
}

h3 {
    font-size: 1.75em; 
}

h4 {
    font-size: 1.5em;
}

h5 {
    font-size: 1.25em;
}

h6 {
    font-size: 1em; 
    font-weight: normal; 
}

*, *::before, *::after {
    box-sizing: border-box;
}

.image-gallery {
    position: relative;
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
    border: 1px solid #ccc;
}

.image-container {
    display: inline-block;
}

.image-container img {
    height: 300px;
    width: auto;
    margin-right: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover
}

.zoomable {
    height: 300px;
    width: auto;
    margin-right: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    transition: transform 0.3s ease;
}

.zoomable.zoomed {
    transform: scale(2); /* Zoom in by 200% */
}

.code {
  max-width: 100%;              /* responsive */
  width: 800px;                 /* set as you wish */
  max-height: 400px;            /* set max height */
  overflow: auto;               /* scroll if too big */
  background: #1e1e1e;          /* dark BG */
  color: #d4d4d4;               /* light text */
  border-radius: 8px;
  margin: 1em 0;
  box-shadow: 0 2px 8px #0004;
  padding: 1em;
}

.code pre, .code code {
  background: transparent !important; /* inherit dark */
  font-size: 1em;
  line-height: 1.5;
  white-space: pre;
}

/* Python Keywords - using your blue family */
.python .k,
.python .kd,
.python .kr,
.python .kn {
    color: #0080cc !important;           /* Lighter version of your #005f99 */
    font-weight: bold !important;
}

/* Python built-ins - complementary warm tone */
.python .nb {
    color: #cc8800 !important;           /* Warm orange that complements your blue */
}

/* Python strings - muted version of your link colors */
.python .s,
.python .s1,
.python .s2 {
    color: #99ccdd !important;           /* Light blue-gray like your #DDDDDD but blue-tinted */
}

/* Python numbers - warm accent */
.python .m,
.python .mi,
.python .mf {
    color: #cc9966 !important;           /* Bronze/copper tone */
}

/* Python comments - muted like your #888888 */
.python .c,
.python .c1 {
    color: #888888 !important;           /* Exactly your hero-content color */
    font-style: italic !important;
}

/* Python functions - accent blue */
.python .nf {
    color: #4da6d9 !important;           /* Mid-tone blue between your colors */
}

/* Python classes - stronger blue */
.python .nc {
    color: #005f99 !important;           /* Your exact signature blue */
    font-weight: bold !important;
}

* C Keywords */
.c .k,
.c .kt {
    color: #005f99 !important;           /* Your signature blue */
    font-weight: bold !important;
}

/* C Preprocessor directives */
.c .cp {
    color: #0080cc !important;           /* Lighter blue */
    font-weight: bold !important;
}

/* C Functions */
.c .n,
.c .nf {
    color: #4da6d9 !important;           /* Mid-tone blue */
}

/* C Strings */
.c .s,
.c .s1,
.c .s2 {
    color: #99ccdd !important;           /* Light blue-gray */
}

/* C Numbers */
.c .m,
.c .mi,
.c .mf {
    color: #cc9966 !important;           /* Bronze tone */
}

/* C Comments */
.c .c,
.c .c1,
.c .cm {
    color: #888888 !important;           /* Your muted gray */
    font-style: italic !important;
}

/* C Operators */
.c .o {
    color: #DDDDDD !important;           /* Your light gray */
}

/* C Parentheses, brackets */
.c .p {
    color: #CCCCCC !important;           /* Slightly darker than your #DDDDDD */
}

/* HTML Tags */
.html .nt {
    color: #005f99 !important;           /* Your signature blue */
    font-weight: bold !important;
}

/* HTML Attributes */
.html .na {
    color: #0080cc !important;           /* Lighter blue */
}

/* HTML Attribute values */
.html .s,
.html .s1,
.html .s2 {
    color: #cc8800 !important;           /* Warm orange accent */
}

/* HTML Text content */
.html .n {
    color: #DDDDDD !important;           /* Your light gray */
}

/* HTML Comments */
.html .c,
.html .cm {
    color: #888888 !important;           /* Your muted gray */
    font-style: italic !important;
}

/* HTML Angle brackets */
.html .p {
    color: #4da6d9 !important;           /* Mid-tone blue */
}

/* HTML Entities */
.html .ni {
    color: #cc9966 !important;           /* Bronze tone */
}

.img-right {
  float: right;
  height: auto;
  margin: 0 .5rem .5rem .5rem;/* space around the picture */
}

.img-right img {
  max-width: 100%;
  height: auto;
}

.img-right figcaption {
  font-size: 0.9em;
  color: #666;
  text-align: center;
  margin-top: .5rem;
  margin-bottom: .5rem;
}

.img-centre {
  float: centre;
  height: auto;
  margin: 0 .5rem .5rem .5rem;/* space around the picture */
}

.img-centre img {
  max-width: 100%;
  height: auto;
}

.img-centre figcaption {
  font-size: 0.9em;
  color: #666;
  text-align: center;
  margin-top: .5rem;
  margin-bottom: .5rem;
}

.img-left {
  float: left;
  height: auto;
  margin: .5rem .5rem .5rem 0;/* space around the picture */
}

.img-left img {
  max-width: 100%;
  height: auto;
}

.img-left figcaption {
  font-size: 0.9em;
  color: #666;
  text-align: center;
  margin-top: .5rem;
  margin-bottom: .5rem;
}
/* Add media queries for responsive design */
@media (max-width: 768px) {
  /* On tablets and phones */
  .img-right, .img-left, .img-centre {
    float: none !important;
    max-width: 100% !important;
    margin: 1rem auto !important;
    display: block;
  }
  
  .code {
    width: 100%;
    max-height: 300px; /* Slightly smaller on mobile */
    padding: 0.5em;
    font-size: 0.9em; /* Slightly smaller font */
  }
  
  .code pre, .code code {
    font-size: 0.85em; /* Adjust code font size for mobile */
  }
}

@media (max-width: 480px) {
  /* On small phones */
  .code {
    max-height: 250px;
    padding: 0.5em;
  }
  
  .code pre, .code code {
    font-size: 0.8em;
  }
}

/* Desktop styles */
@media (min-width: 769px) {
  .img-right, .img-left, .img-centre{
    max-width: 35%;
  }
}

/* clearfix so later content doesn't wrap under the float */
.topic::after {
  content: "";
  display: block;
  clear: both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.home-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
}

.profile-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 5px;
}

.project-title {
  font-size: 18px;
  font-weight: 600;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid #ddd;
}

html {
  scroll-padding-top: 100px; /* Adjust this to your header height + some extra space */
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

nav {
  grid-column: 2;
}

.contact-links {
  grid-column: 3;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .header-content {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .brand {
    justify-content: center;
  }
  
  nav {
    grid-column: 1;
  }
  
  .contact-links {
    grid-column: 1;
    justify-content: center;
    order: -1; /* Puts contact links at top on mobile */
  }
}

/* Remove the duplicate .header-content and .contact-icon rules, and use this consolidated version: */

.header-content {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px 20px;
}

.profile-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 5px;
}

.project-title {
  font-size: 18px;
  font-weight: 600;
  color: #DDDDDD;  /* Added to make text light */
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid rgba(221, 221, 221, 0.3);  /* Made border lighter */
}

nav {
  grid-column: 2;
}

.contact-links {
  grid-column: 3;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}

/* Clean contact link styling */
.contact-links a {
  background: transparent !important;
  border: none;
  outline: none;
  display: inline-flex;  /* Helps with alignment */
  align-items: center;
}

.contact-icon {
  width: 24px;
  height: 24px;
  transition: all 0.3s ease;
  /* Remove the filter line - it can cause issues */
}

.contact-icon:hover {
  fill: #FFFFFF;
  stroke: #FFFFFF;
  transform: translateY(-2px);
}

.cta-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 12px 20px;
  background-color: #2b6cb0;
  color: white;
  text-decoration: none;
  font-weight: bold;
  border-radius: 6px;
}

.cta-button:hover {
  background-color: #2c5282;
}

