/* styles.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navy: #0a1628;
    --slate: #2d3e50;
    --accent: #f0ad4e;
    --accent-alt: #3498db;
    --light: #ecf0f1;
    --white: #ffffff;
    --text: #1a1a1a;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background-color: #fafafa;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    z-index: 0;
}

/* Canvas Background */
#networkCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6; /* Increase from 0.4 to 0.6 or even higher */
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    background-color: var(--navy);
    padding: 1rem 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--light);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--light);
    margin: 5px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy) 0%, var(--slate) 100%);
    color: var(--white);
    text-align: center;
    padding: 2rem;
    position: relative;
    margin-bottom: 1rem;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 7.5px;
    background: linear-gradient(to bottom, transparent, #fafafa);
    pointer-events: none;
}

.hero-contact {
    position: relative;
    z-index: 3; /* Place contact buttons above canvas */
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.hero-content .tagline {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    color: var(--light);
    font-weight: 300;
}

.hero-contact h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.contact-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 3; /* Ensure buttons are above canvas */
}

.contact-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 1.5rem;
    position: relative;
    z-index: 3; /* Ensure individual buttons are above canvas */
}

.email-btn {
    background-color: var(--accent);
    color: var(--navy);
    opacity: 1;
}

.email-btn:hover {
    background-color: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

.linkedin-btn {
    background-color: #0077b5;
    color: var(--white);
    font-size: 1.5rem;
    opacity: 1;
}

.linkedin-btn:hover {
    background-color: transparent;
    color: #0077b5;
    border-color: #0077b5;
}

.github-btn {
    background-color: #434343;
    color: var(--white);
    font-size: 1.5rem;
    opacity: 1;
    position: relative;
    overflow: visible;
}

.github-btn:hover {
    background-color: transparent;
    border-color: #434343;
}

.github-btn i {
    transition: all 0.3s ease;
    background-color: transparent;
}

.github-btn:hover i {
    color: #333;
    background-color: var(--white);
    padding: 0.075rem;
    border-radius: 50%;
}

.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem;
    position: relative;
    z-index: 2;
    scroll-margin-top: 75px;
}

.section-wrapper {
    background-color: rgba(255, 255, 255);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.section-alternate {
  grid-template-columns: 1fr 1fr;
}

.section-alternate .section-content {
  grid-column: 1;
  grid-row: 2;
}

.section-alternate .section-image {
  grid-column: 2;
  grid-row: 2;
}

.section-image {
    width: 100%;
    min-width: 0;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.section-image-top {
    grid-column: 1 / -1;
    width: 100%;
}

.section-image-top img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.section-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.section-content {
    flex: 1;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.section h2 {
    grid-column: 1 / -1;
    font-size: 2.5rem;
    margin-bottom: -.5rem;
    color: var(--navy);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.contact-section h2 {
    margin-bottom: -1.9rem;
}

.section h2::before,
.section h2::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--accent), transparent);
}

.section h2::after {
  background: linear-gradient(to left, var(--accent), transparent);
}

.section-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--navy);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.section-content h2::before,
.section-content h2::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--accent), transparent);
}

.section-content h2::after {
    background: linear-gradient(to left, var(--accent), transparent);
}

.section-content p {
    margin-bottom: 1.5rem;
    color: var(--text);
    line-height: 1.8;
}

.section-list {
    list-style: none;
    /* margin: 1.5rem 0; */
}

.section-list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text);
}

.section-list li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.internal-link,
.thesis-link {
    color: var(--accent-alt);
    text-decoration: none;
    border-bottom: 2px solid var(--accent-alt);
    transition: all 0.3s ease;
}

.internal-link:hover,
.thesis-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Contact Section */
.contact-section {
    grid-template-columns: 1fr;
}

.contact-section .section-content {
    background-color: rgba(255, 255, 255, 0.95);
    grid-column: 1 / -1;
}

/* .contact-form {
    max-width: 600px;
    margin: 2rem 0;
} */

.contact-intro {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text);
    grid-column: 1 / -1;
}

.contact-section .contact-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
    grid-column: 1 / -1; 
}

.contact-email {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--navy);
    margin-top: 1.5rem;
    grid-column: 1 / -1;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--navy);
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid var(--slate);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.submit-btn {
    background-color: var(--accent);
    color: var(--navy);
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background-color: var(--navy);
    color: var(--accent);
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    display: none;
}

.form-message.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer */
.footer {
    background-color: var(--navy);
    color: var(--light);
    text-align: center;
    padding: 2rem;
    margin-top: 1rem;
}

/* Responsive Design */
/* @media (max-width: 768px) { */
@media (max-width: 1075px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--navy);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        display: block;
        padding: 1.5rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content .tagline {
        font-size: 1rem;
    }

    .section {
        grid-template-columns: 1fr;
        gap: 2rem;
        /* padding: 1rem 0.5rem; */
        padding: 0rem 0.5rem;
    }

    .section-alternate {
        grid-template-columns: 1fr;
    }

    .section-alternate .section-image {
        order: 0;
    }

    .section-content h2 {
        font-size: 1.8rem;
    }

    .section-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .section h2 {
        grid-column: 1;
        grid-row: 1;
    }

    .contact-section h2 {
        margin-bottom: -2.9rem;
    }
    
    .section-image {
        grid-column: 1;
        grid-row: 2;
        order: 0;
    }
    
    .section-content {
        grid-column: 1;
        grid-row: 3;
    }
    
    .section-alternate .section-content {
        grid-column: 1;
        grid-row: 3;
    }
    
    .section-alternate .section-image {
        grid-column: 1;
        grid-row: 2;
    }

    .contact-buttons {
        flex-direction: row;
        align-items: center;
    }
    
    .contact-btn {
        width: 60px;
        height: 60px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .section {
        padding: 2rem 1rem;
    }

    .section-content h2 {
        font-size: 1.5rem;
    }

    .contact-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}