/* style.css */
/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
  scroll-padding-top: 100px; /* Height of your navbar + 5-10px extra */
}

:root {
    --primary: #000000;
    --secondary: #707070;
    --dark: #343434;
    --light: #ffffff;
    --accent1: #ff4722;
    --accent2: #4ecdc4; /* unused */
}

body {
    font-family: 'Geist', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */

#header-container {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

header {
    background-color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.7rem;
    font-weight: 500;
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
}

.link {
    text-decoration: none;
    font-weight: 500;
    color: var(--primary);
}

.link:hover{
    text-decoration: underline;
    cursor: pointer;
}

.hamburger {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1000;
}

.hamburger span {
    display: block;
    width: 30px;
    height: 3px;
    background: var(--primary);
    margin: 6px 0;
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    transform-origin: center;
}

/* Hamburger animation when active */
.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background: var(--accent1);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background: var(--accent1);
}

/* Hero Banner */
.hero-banner {
  position: relative;
  height: 90vh; /* Adjustable height */
  max-height: 700px; /* Prevents excessive height on large screens */
  min-height: 600px; /* Minimum height */
  overflow: hidden;
  margin-bottom: 4rem; /* Creates space for next section */
}

.hero-image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom, 
    rgba(0,0,0,0.7) 0%, 
    rgba(0,0,0,0.3) 50%,
    transparent 100%
  );
  z-index: 2;
}

.hero-content {
  position: absolute;
  bottom: 15%; /* Positions content above bottom */
  left: 10%;
  max-width: 650px;
  color: white;
  z-index: 3;
  padding-right: 2rem;
}


.hero-content h1 {
  font-size: clamp(3rem, 5.5vw, 4.5rem);
  line-height: 1.15;
}

.underlined-placeholder.underlined-placeholder {
    color: transparent;
    font-family: 'Caveat', cursive;
    font-size: clamp(6rem, 8vw, 10rem);
    text-decoration: underline;
    text-decoration-color: var(--accent1);
    text-decoration-thickness: 4px;
    text-underline-offset: 8px;
    white-space: nowrap;
    font-weight: 700;
}

/*Chained selector to itself to increase specificity and override size of h1*/

.animated-text.animated-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    color: white;
    font-family: 'Caveat', cursive;
    font-size: clamp(6rem, 8vw, 10rem);
    font-weight: 700;
}

@keyframes handwriting {
    from { width: 0; }
    to { width: 100%; }
}


/* Text Sections */
.text-section {
    display: block;
    padding: 4.5rem 10%;
}

.content {
    max-width: 1400px;
    margin: 0 auto;
}


#portfolio {
    font-weight: 600;
    font-size: clamp(2.75rem, 3vw, 3.5rem);
    text-align: center;
    padding-bottom: 20px;
    color: var(--primary);
}

h2 {
    font-size: clamp(1.75rem, 2vw, 2.5rem);
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-weight: 580;
}

.text-section p {
    margin-bottom: 1.2rem;
    font-weight: 300;
    font-size: clamp(1.1rem, 1.25vw, 1.3rem);
}

.project-category {
    text-align: center;
    color: var(--primary);
}

.text-section button {
    font-weight: 300;
    font-size: clamp(1.1rem, 1.25vw, 1.3rem);
}

/* Text section grid layouts */

#about {
    display: flex;
    gap: 80px;
    align-items: center;
    margin-bottom: 7%;
}

.content {
    flex: 75%;
}

.headshot {
    flex: 25%;
}

.headshot-image {
    border-radius: 50%;
    aspect-ratio: 1/1;
    height: clamp(300px, 30vw, 500px);
    object-fit: cover;
    margin: 0 auto;
    transition: height 0.3s ease;
}

#contact {
    display: flex;
    gap: 80px;
    align-items: top;
    padding-top: 3rem;
    padding-bottom: 7rem;
}

#contact p {
    margin: 0;
}

.end {
    flex: 25%;
}

.end-image {
    border-radius: 5%;
    height: clamp(200px, 45vw, 600px);
    object-fit: cover;
    margin: 0 auto;
    transition: height 0.3s ease;
}

/* Project tiles layouts */

#projects {
    padding-top: 0;
}

.project-box {
    display: grid;
    gap: 4vw;
    padding-bottom: 80px;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 1fr;
}

.project-item {
    min-width: 300px;
    max-width: 550px;
    display: flex;
    border-radius: 8px;
    background: #ffffff;
    transition: transform 0.3s ease;
}

.project-item:hover, 
.project-item:active {
    transform: translateY(-5px);
}

.project-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0;
    text-decoration: none;
    color: var(--dark);
    width: 100%;
}

.project-img {
    width: 100%;
    aspect-ratio: 1.58/1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.project-name {
    font-weight: 600;
    margin: 7px 0;
    font-size: 1.25rem;
    color: var(--dark);
}

.project-byline {
    color: var(--secondary);
    font-size: 1rem;
}


/* Contact Button */

.contact-btn {
    border: 0;
    display: inline-block;
    padding: 1.3rem 1rem;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.contact-btn:hover {
    background-color: var(--accent1);
}

#copy-text {
    display: block;
    padding: 0.8rem 0 0 0;    
    cursor: pointer; 
    font-weight: 500;
}

/* back to top button */

#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 15px;
  font-size: 18px;
  background-color: var(--secondary);
  color: white;
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: none; /* Initially hidden */
  z-index: 1000; /* Ensure it stays above other elements */
}

#back-to-top:hover {
  background-color: var(--accent1);
}

/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    text-align: center;
    padding: 3rem;
}

/*
.social-links {
    margin-top: 1.5rem;
}

.social-links a {
    color: var(--secondary);
    margin: 0 1rem;
    text-decoration: none;
}
*/

/* Responsive Design */
@media (max-width: 768px) {

    .hero-banner {
    height: 75vh;
    min-height: 400px;
    }
  
    .hero-content {
    left: 5%;
    bottom: 10%;
    padding-right: 5%;
    }
  
    .hero-overlay {
    background: linear-gradient(
      to bottom, 
      rgba(0,0,0,0.7) 0%, 
      rgba(0,0,0,0.4) 70%,
      transparent 100%
    );
    }

    .underlined-placeholder.underlined-placeholder {
    font-size: clamp(5.5rem, 7vw, 9rem);
    }

    .animated-text.animated-text {
    font-size: clamp(5.5rem, 7vw, 9rem);
    }

    .nav { 
        padding: 1rem;
    }
    
    .nav-links a {
        font-size: clamp(2.5rem, 3vw, 4rem);
        color: var(--primary);
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .hamburger {
        display: block;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 100%;
        background: var(--light);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.5s ease;
        z-index: 900;
    }
    
   .logo {
        position: relative;
        z-index: 1001;
   }
    
    .text-section {
        padding: 4rem 1.5rem;
    }

    #about {
        flex-direction: column;
        gap: 30px;
        margin-bottom: 10vh;
    }

    .project-category {
        padding-top: 5%;
        text-align: left;
    }

    .project-box {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 10vh;
        padding: 0px;
        margin-bottom: 10vh;
    }

    .project-link {
    align-items: flex-start;
    text-align: left;
    }

    .project-item {
        min-width: 200px;
    }

    #portfolio {
        text-align: left;
    }

    .portfolio-box {
        padding-bottom: 2rem;
    }

    #contact {
        flex-direction: column;
        gap: 30px;
        padding-top: 1rem;
    }

    .end-image {
    height: clamp(200px, 120vw, 600px);
    }

    #copy-text {
    display: block;
    padding: 1rem 0;
    }
}
