
*{
    margin: 0;
    padding: 0;
}

:root {
  --color-primary: #2C3E50;
  --color-secondary: #18BC9C;
  --color-accent: #f4c95d;

  --text-color: #333;
  --bg-color: #fff;

  --font-primary: "Inter", sans-serif;
  --font-heading: "Playfair Display", serif;
  --font-mono: monospace;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;

  --space-xs: 0.25rem;  /* 4px */
  --space-sm: 0.5rem;   /* 8px */
  --space-md: 1rem;     /* 16px */
  --space-lg: 1.5rem;   /* 24px */
  --space-xl: 2rem;     /* 32px */
  --space-2xl: 3rem;    /* 48px */


  --text-xs: 0.75rem;       /* 12px */
  --text-sm: 0.875rem;      /* 14px */
  --text-md: 1rem;          /* 16px */
  --text-lg: 1.125rem;      /* 18px */
  --text-xl: 1.25rem;       /* 20px */
  --text-2xl: 1.5rem;       /* 24px */
  --text-3xl: 2rem;         /* 32px */
  --text-4xl: 2.5rem;       /* 40px */
}

body {
    min-height: 100vh;
}

/************************************************************ NAVBAR *************************************************************/

nav {
    background-color: var(--color-primary);
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    z-index: 1000;
    top: 0;
    width: 100%;
    height: 50px;
    transition: all 0.3s ease;
    padding: var(--space-sm);
}

.navbar.shrink {
    height: 40px;
    padding: var(--space-sm);
}

nav ul {
    width: 100%;
    list-style: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

nav li {
    border-radius: 10px;
    height: 50px;

    position: relative;
    overflow: hidden;
    
}

nav a {
    height: 100%;
    padding: 0 var(--space-xl);
    text-decoration: none;
    display: flex;
    align-items: center;
    color: white;

    font-family: var(--font-primary);
    font-weight: var(--font-weight-bold);
    font-size: var(--text-lg);

    border-radius: 10px;

}

nav li:first-child{
    margin-right: auto;
}

nav li::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #18BC9C, #2C3E50);
    z-index: -1;

    transform: translate(100%, 100%);
    transition: transform 0.3s ease;
}

nav li:hover::before {
    transform: translate(0, 0);
}

.logo{
    color: #2C3E50;
    height: 40px;
    width: auto;
}

.dropdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #2C3E50;

    position: absolute;
    top: 100%;
    left: 0;

    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease;

    width: 100%;
}

.dropdown ul {
    display: flex;
    justify-content: center;
}

.dropdown li {
    border-radius: 10px;

    position: relative;
    overflow: hidden;
    cursor: pointer;
    z-index: 0;
}

.dropdown li:first-child{
    margin-right: 0;
}

.dropdown a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
}

.dropdown.active {
    align-items: center;
    max-height: 500px;
    opacity: 1;
}

.dropdown li::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #18BC9C, #2C3E50);
    z-index: -1;

    transform: translate(100%, 100%);
    transition: transform 0.3s ease;
}

.dropdown li:hover::before {
    transform: translate(0, 0);
}


@media (min-width: 769px) {
    .dropdown {
        display: none;
    }
}

.menu-button{
    display: none;
}


/********************************************************** HERO SECTION ***************************************************************************/

.banner {
    height: 81vh;
    background-image: url("../img/darren_banner.png");
    background-size: cover;
    background-position: center 0px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    color: white;
}

.banner-content {
    opacity: 0;
    animation: slideUp 1s ease forwards;
    transform: translateY(clamp(10px, 2vh, 30px));
    margin-bottom: 50px;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.banner-content h1 {
    font-size: clamp(1.8rem, 5vw, 4rem);
    margin: 0;
    color: white;
    background: rgba(255, 0, 0, 0.3);
    display: inline-block;
    font-family: var(--font-primary);
}

.banner-content p {
    font-size: clamp(1.2rem, 4vw, 3rem);
    margin: 0 0 30px 0;
    color: white;
    background: rgba(255, 0, 0, 0.3);
    padding: var(--space-xs) var(--space-sm);
    font-family: var(--font-primary);
}

/*********************************************************** PROJECTS SECTION ************************************************************/
.projects-section {
    justify-content: center;
    align-items: center;
    display: flexbox;
}

.projects {
    padding: var(--space-lg);
    align-items: center;
    justify-content: center;
}


.projects-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.projects-divider img {
    width: 30px;
    margin-bottom: 40px;
}

/************************************************************** THE LINE BREAKERS *****************************************************************/
.br {
    width: 100px;
    height: 5px;
    background: var(--color-primary);
    margin: 20px auto;
    margin: 0;
    position: relative;
    top: -20px;
}

/************************************************************** THE LINE BREAKERS ************************************************/

.projects-title {
    font-size: var(--text-4xl);
    margin-bottom: 10px;
    text-align: center;
    color: var(--color-primary);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.filters button {
    padding: var(--space-sm) var(--space-md);
    border: none;
    background: #eee;
    cursor: pointer;
    font-weight: 400;
    font-family: system-ui, sans-serif;
    transition: 0.2s;
    border-radius: 4px;
}

.filters button.active,
.filters button:hover {
    background: var(--color-secondary);
    color: white;
}

/* Grid */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
    justify-items: center;
}
/* Card */
.card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    width: 250px;
    position: relative;
}

.card {
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.card.hide {
    transform: scale(0);
    opacity: 0;
}

.card:hover {
    transform: scale(1.03);
}

.card img {
    width: 100%;
    display: block;
}

.card h3 {
    font-size: var(--text-2xl);
    padding: var(--space-md);
    margin: 0;
    color: var(--color-secondary);
    font-family: var(--font-primary);
}

/* overlay */
.card-image {
    position: relative;
}

.card-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #18BC9C;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../img/mag_glass.svg") center center no-repeat;
    background-size: 50px 50px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
    pointer-events: none;
}

.card-image:hover::before {
    opacity: 0.5;
}

.card-image:hover::after {
    opacity: 1;
}

.card-image::before,
.card-image::after {
    pointer-events: none;
    color: white;
}

/************************************************** MODAL ********************************************************/

.modal {
    background-color: rgba(255, 255, 255, 0.99);
    width: 100vw;
    height: 100vh;
    left: 0;
    top: 0;
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    pointer-events: auto;
    overflow-y: auto;
}

.no-display {
    display: none;
}

.mod_img {
    display: block;

    width: auto;
    max-width: 90vw;
    min-width: 200px;

    height: auto;
    max-height: 60vh;
    
    margin: 0 auto;

    border-radius: 10px;
}

.modal-content {
    position: relative;
    padding: var(--space-md) var(--space-lg);
    max-width: 650px;
    margin: 0;
    
    text-align: left;

    display: flex;
    flex-direction: column;
    gap: 15px;
}

.proj-description {
    font-size: var(--text-md);
    line-height: 1.5;
    margin-bottom: 12px;
    color: #222;
    font-family: var(--font-heading);
}

.modal-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    font-size: var(--text-md);
    color: #666;
}

.modal-meta p,
.modal-meta a {
    display: flex;
    align-items: center;
    margin: 0;
    gap: 6px;
}

.proj-date {
    font-weight: 600;
    white-space: nowrap;
    color: var(--color-secondary);
}

.proj-categories {
    font-weight: 600;
    text-align: right;
    color: var(--color-secondary);
}

.proj-title {
    width: auto;
    margin-top: 100px;
    font-size: var(--text-2xl);
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    background-color: var(--color-secondary);
    border: none;
    padding: var(--space-xs);
    cursor: pointer;
    border-radius: 10px;
}

.left { left: 20px; }
.right { right: 20px; }

.nav-btn:hover {
    background: var(--color-primary);
}

.close-btn {
    position: absolute;
    top: 70px;
    right: 50px;

    width: 50px;
    height: 50px;

    font-size: var(--text-3xl);
    line-height: 50px;
    text-align: center;

    background-color: var(--color-secondary);
    color: white;

    border: none;
    border-radius: 50%;
    cursor: pointer;

    z-index: 10;
}

.close-btn:hover {
    background: var(--color-primary);
}

.no-scroll {
    overflow: hidden;
}

.ext-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #1a73e8;
    font-size: var(--text-sm);
}

.ext-link svg {
    width: 14px;
    height: 14px;
    display: block;
    flex-shrink: 0;
    transform: translateY(1px);
}
.ext-link:hover .ext-icon {
    fill: #0b57d0;
    transform: translate(2px, -2px);
}
/************************************************************* NEWS SECTION  ********************************************************************/

.news-section {
    padding: 80px 20px;
    display: flex;
    justify-content: center;
    background-color: var(--color-secondary);
    color: white;
}

.news-container {
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.news-title {
    font-size: var(--text-4xl);
    margin-bottom: 10px;
}

/* SVG */
.news-divider img {
    width: 30px;
    margin-bottom: 40px;
}
.news-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

/*********** THE LINE BREAKERS **************/
.hr {
    width: 100px;
    height: 5px;
    background: white;
    margin: 0;
    position: relative;
    top: -20px;
}

/* Card */
.news-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
}

/* Text */
.news-content {
    flex: 1;
}

.news-date {
    font-size: var(--text-sm);
    color: white;
}

.news-heading {
    font-size: var(--text-lg);
    margin: 8px 0;
}

.news-snippet {
    font-size: var(--text-md);
    color: white;
    line-height: 1.5;
}

/* Image */
.news-image img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid white;
}

/* Button */
.news-button-wrapper {
  margin-top: 30px;
}

.news-button {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid rgb(255, 255, 255);
    text-decoration: none;
    font-size: var(--text-md);
    font-weight: 400;
    font-family: system-ui, sans-serif;
    transition: all 0.2s ease;
    color: white;
}

.news-button:hover {
  background-color: white;
  color: var(--color-secondary);
}

.news-snippet {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/**************************************************** FOOTER ******************************************************************/

.footer {
    padding: 40px 20px;
    background-color: var(--color-primary);
    color: var(--color-accent);
    display: flex;
    justify-content: center;
}

.footer-content {
    max-width: 600px;
    width: 100%;
    text-align: center;
}

/* Title (optional "Connect") */
.footer-content p:first-child {
    font-size: var(--text-lg);
    margin-bottom: 15px;
    font-weight: 500;
}

/* Social links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.social-links a {
    text-decoration: none;
    color: white;
    font-size: var(--text-md);
    position: relative;
}

/* subtle underline hover */
.social-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0%;
    height: 1px;
    background: white;
    transition: width 0.2s ease;
}

.social-links a:hover::after {
    width: 100%;
}

/* Email */
.footer-email {
    font-size: var(--text-sm);
    opacity: 0.8;
}

.social-links i {
    font-size: var(--text-2xl);
}

.footer-copy {
    font-size: var(--text-xs);
}
/********** MEDIA QUERIES   *****************/
@media(max-width: 800px){

    .hideOnMobile{
        display: none;
    }

    .menu-button{
        display: block;
    }

    .banner {
        height: 40vh;
        background-position: center top;
    }

    .news-card {
        flex-direction: column-reverse;
        text-align: center;
    }

    .news-image img {
        width: 100px;
        height: 100px;
    }

    .social-links {
        flex-direction: column;
        gap: 10px;
    }

    .modal {
        flex-direction: column;
        gap: 16px;
    }

    .mod_img {
        box-sizing: border-box;
        padding: 10px 20px;
        margin-top: 10px;
        max-width: 700px;
        width: auto;
        height: auto;
        max-height: 80vh;
    }
}

@media(max-width: 400px){
    .dropdown{
        width: 100%;
    }

    .mod_img {
        max-width: 85%;
        max-height: 50vh;
    }
}

@media (min-width: 401px) and (max-width: 800px) {
    .mod_img {
        max-width: 85%;
        max-height: 60vh;
    }

    nav a {
        padding: 0 var(--space-sm);
    }
}

@media (min-width: 801px) and (max-width: 890px) {

    nav a {
        padding: 0 var(--space-md);
    }
}
