/* Global Styles */
body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    font-family: 'Roboto', sans-serif;
}

main {
    flex: 1 0 auto;
}

/* Hero Section */
.hero {
    background-color: #212121;
    background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23424242' fill-opacity='0.4' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 5v1H5z'/%3E%3Cpath d='M6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");
    padding: 60px 0;
    margin-bottom: 20px;
}

.profile-img {
    border-radius: 50%;
    max-width: 250px;
    border: 5px solid white;
    margin-top: 20px;
}

/* Section Styling */
.section {
    padding: 40px 0;
}

.equal-height-cards {
    display: flex;
    flex-wrap: wrap;
}

.equal-height-cards .col {
    display: flex;
}

.equal-height-cards .card {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.equal-height-cards .card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.equal-height-cards .card-content .chip {
    display: inline-block;
    margin: 0 3px 3px 0;
}

.chip-container {
	display: block;
	margin-bottom: 15px;
}

.equal-height-cards .card-content p {
	flex-grow: 1;
}

.equal-height-cards .btn {
    align-self: flex-start;
    margin-top: auto;
}

/* Tab styling */
.tabs {
    background-color: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.tabs .tab a {
    color: rgba(0, 0, 0, 0.7);
    font-weight: 500;
}

.tabs .tab a:hover,
.tabs .tab a.active {
    color: #000;
    background-color: rgba(0, 0, 0, 0.05);
}

.tabs .tab a:focus,
.tabs .tab a:focus.active {
    background-color: rgba(0, 0, 0, 0.1);
}

.tabs .indicator {
    background-color: #000;
    height: 3px;
}

/* Make sure tab content rows work with flexbox */
.tab-content {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.tab-content .col {
    /* Force each column to be exactly 1/3 of container width (minus margins) */
    flex: 0 0 calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
    margin: 0 10px 20px;
}

.tab-content:after {
    content: "";
    flex: 0 0 calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
    margin: 0 10px 20px;
    /* Add as many "flex-grow" elements as needed to fill incomplete rows */
    order: 999; /* Push to end */
    visibility: hidden; /* Make invisible */
}

/* Add some spacing between tabs and content */
#programming, #systems, #security, #legal {
    margin-top: 20px;
}

.chip {
    display: inline-block !important;
    height: 32px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(0,0,0,0.6);
    line-height: 32px;
    padding: 0 12px;
    border-radius: 16px; /* This ensures the rounded corners */
    background-color: #e4e4e4;
    margin-bottom: 5px;
    margin-right: 5px;
    max-width: fit-content; /* Ensures chip doesn't stretch */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chip-container:after {
    content: "";
    display: table;
    clear: both;
}

.divider {
    background-color: #424242; /* dark graphite color */
    height: 2px;
    margin-bottom: 30px;
}

/* Card Styling - updated */
.card-panel {
    display: flex;
    flex-direction: column;
    padding: 20px;
    height: 100%; /* Change from fixed 180px */
    min-height: 180px; /* Minimum height instead */
    transition: all 0.3s ease-in-out;
    margin: 0.5rem 0 1rem 0; /* Consistent margins */
}

/* Fix clearfix for rows */
.row:after {
    content: "";
    display: table;
    clear: both;
}

.card-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 17px 2px rgba(0,0,0,0.14), 0 3px 14px 2px rgba(0,0,0,0.12), 0 5px 5px -3px rgba(0,0,0,0.2);
}

.card-panel h5 {
    font-size: 1.2rem; /* Smaller font size for skill titles */
    word-wrap: break-word; /* Allow words to break */
    overflow-wrap: break-word;
    hyphens: auto; /* Enable hyphenation */
}

@media only screen and (max-width: 600px) {
    .card-panel {
        height: auto; /* Auto height instead of fixed height */
        min-height: 150px; /* Minimum height */
        padding: 15px 10px; /* Smaller padding */
    }
    
    .card-panel h5 {
        font-size: 1rem; /* Even smaller font for mobile */
    }
    
    nav .brand-logo {
    font-size: 1.5rem; /* Smaller font size on mobile */
    width: 100%;
    text-align: center;
    left: 0;
    transform: none;
  }
}

@media only screen and (max-width: 992px) and (min-width: 601px) {
    .card-panel h5 {
        font-size: 1.1rem; /* Slightly smaller font for tablets */
    }
}


/* Button Styling */
.btn {
    margin-top: 20px;
}

.card-content .btn {
    margin-top: 30px;
}

/* Footer Styling */
footer.page-footer {
    margin-top: 0;
}

/* Contact Page */
.contact-info i {
    margin-right: 10px;
}

/* Shop Page */
.product-card .card-image {
    height: 200px;
    overflow: hidden;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #673ab7;
}

/* Timeline for Experience */
.timeline {
    position: relative;
    margin: 40px 0;
}

.timeline:before {
    content: '';
    position: absolute;
    height: 100%;
    width: 4px;
    background: #673ab7;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 50px;
    position: relative;
}

.timeline-content {
    width: 45%;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2);
    background: white;
}

.timeline-item:nth-child(even) .timeline-content {
    float: right;
}

.timeline-item:nth-child(odd) .timeline-content {
    float: left;
}

.timeline-item:after {
    content: '';
    display: block;
    clear: both;
}

.timeline-date {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #673ab7;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
}

/* Responsive adjustments */
@media only screen and (max-width: 992px) {
    .timeline:before {
        left: 50px;
    }
    
    .timeline-content {
        width: calc(100% - 150px);
        margin-left: 150px;
    }
    
    .timeline-item:nth-child(even) .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content {
        float: none;
    }
    
    .timeline-date {
        left: 50px;
    }
    
    .tab-content .col {
        flex: 0 0 calc(50% - 20px);
        max-width: calc(50% - 20px);
    }
    
    .tab-content:after {
        flex: 0 0 calc(50% - 20px);
        max-width: calc(50% - 20px);
    }
}

}

@media only screen and (max-width: 600px) {
    .timeline:before {
        left: 30px;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px;
    }
    
    .timeline-date {
        left: 30px;
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    .tab-content .col {
        flex: 0 0 100%;
        max-width: 100%;
        margin: 0 0 20px;
    }
    
    .tab-content:after {
        display: none; /* Not needed for single column layout */
    }
}

/* Dropdown option colors - more specific */
.dropdown-content li > span,
.dropdown-content li > a {
  color: #000 !important;  /* Black text color */
  font-weight: 500 !important;
}

/* Selected option */
.select-dropdown.dropdown-content li.selected > span {
  color: #000 !important;
  background-color: rgba(0, 0, 0, 0.05);
}

/* Make sure focus color matches */
.input-field .select-wrapper input.select-dropdown:focus {
  border-bottom: 1px solid #000 !important;
}

/* Change dropdown icon color */
.select-wrapper .caret {
  fill: #000 !important;
}

/* Dropdown hover effect */
.dropdown-content li:hover, 
.dropdown-content li.active {
  background-color: rgba(0, 0, 0, 0.05) !important;
}


.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;  /* Preferred icon size */
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;

  /* Support for all WebKit browsers. */
  -webkit-font-smoothing: antialiased;
  /* Support for Safari and Chrome. */
  text-rendering: optimizeLegibility;

  /* Support for Firefox. */
  -moz-osx-font-smoothing: grayscale;

  /* Support for IE. */
  font-feature-settings: 'liga';
}

.profile-img {
    border-radius: 50%;
    max-width: 250px;
    width: 100%; /* This forces the image to fill the container */
    border: 5px solid white;
    margin-top: 20px;
}

/* Clean and unified dark sidenav */
.dark-sidenav {
    background-color: #312f2f;
    padding-top: 0px;
}

.dark-sidenav li {
    margin: 0;
    border-bottom: 1px solid #1b1b1b;
}

.dark-sidenav li > a {
    display: block;
    padding: 16px 24px;
    font-weight: 500;
    color: #ffffff;
    font-size: 1.1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dark-sidenav li > a:hover {
    background-color: #424242;
    color: #ffffff;
}
