/* ==== CSS VARIABLES ==== */

:root {
    --gradient-main: linear-gradient(to bottom, #d7ffe3, #fefeff);
    --color-green: #d7ffe3;
    --color-green-transparent: rgba(215, 255, 227, 0.6);
    --color-link: #89d6a0;
    --color-text: #555555;
    --color-text-hover: #404b43;
    --color-bg: #fefeff;
    
    --text-xlarge: 1.8rem;
    --text-large: 1.3rem;
    --text-base: 1rem;
}


/* ==== BASE STYLES ==== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    background-color: var(--color-bg);
    overflow-x: hidden;
    font-family: 'Montserrat', 'Verdana', 'Century Gothic', sans-serif;
}

body {
    min-height: 100vh;
}

a:link, a:visited, a:hover, a:active {
	text-decoration: none;
	color:var(--color-link);
}

/* ==== SPACER ==== */

.spacer {
    width: 100%;
    background: var(--gradient-main);
    height: 120px;
    transition: height 0.6s ease-in-out;
}

/* When any panel is open, spacers shrink */
body.panel-open .spacer {
    height: 40px;
}


/* ==== ACCORDION CONTAINER ==== */

.accordion-container {
    width: 100%;
}


/* ==== ACCORDION PANELS (CLOSED STATE) ==== */

.accordion-panel {
    width: 100%;
    overflow: hidden;
    transition: all 0.6s ease-in-out;
}

/* Headers with gradient background */
.accordion-header {
    background: var(--gradient-main);
    padding: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    height: 180px;
    transition: all 0.6s ease-in-out;
}

.accordion-header h2 {
    font-family: 'Superclarendon', 'IBM Plex Serif', 'Georgia', 'Book Antiqua', serif;
    color: var(--color-text);
    font-size: 5rem;
    font-weight: normal;
    line-height: 1;
    transition: all 0.6s ease-in-out;
}

/* Content when panel opens (first hidden) */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    background-color: var(--color-bg);
    padding: 0 60px;
    font-family: 'Montserrat','Verdana', 'Century Gothic', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    transition: all 0.6s ease-in-out;
}


/* ==== ACCORDION STATES - OPEN ==== */

/* When a panel is OPEN */
.accordion-panel.active .accordion-content {
    max-height: 5000px;
    padding: 60px;
    overflow-y: auto;
}


/* ==== ACCORDION STATES - CLOSED (/ when another is open) ==== */

/* When another panel is open, shrink the CLOSED panels */
body.panel-open .accordion-panel:not(.active) .accordion-header {
    height: 60px;
    padding: 20px 60px;
}

body.panel-open .accordion-panel:not(.active) .accordion-header h2 {
    font-size: 2rem;
}


/* ==== HOVER EFFECTS ==== */

.accordion-header:hover h2 {
    color: var(--color-text-hover);
}

.accordion-header:hover {
    opacity: 0.95;
}


/* ==== TYPOGRAPHY UTILITY CLASSES ==== */

.text-xlarge {
    font-size: var(--text-xlarge);
    color: var(--color-text);
}

.text-large {
    font-size: var(--text-large);
    line-height: 1.6;
    color: var(--color-text);
}

.text-base {
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text);
}

b, strong {
  font-weight: 500;
  color: var(--color-text);
}

::selection {
  background-color: var(--color-green);
  color: black; /* optional - changes text color too */
}

/* Firefox needs the prefix */
::-moz-selection {
  background-color: var(--color-green);
  color: black;
}


/* ==== ABOUT SECTION STYLES ==== */

.about-container {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
}

.about-text {
    /* flex: 1;
    text-align: right; */
    flex: 1;
    text-align: justify;
    hyphens: auto;
    max-width: 600px; 
    margin-left: auto;
}

.typewriter {
    font-size: var(--text-xlarge);
    font-weight: normal;
    margin-bottom: 20px;
    color: var(--color-text);
    /* Typewriter effect - initially hidden */
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    margin-left: auto; /* Push to the right */

}

/* Typewriter animation */
.typewriter.typing {
    animation: typing-rtl 4s steps(24) forwards;
}

/* Remove cursor after typing finishes */
.typewriter.typing-complete {
    border-left: none;
}

@keyframes typing-rtl {
    to { width: 100%; }
}

@keyframes blink-left {
    50% { border-left-color: transparent; }
}

.about-role {
    line-height: 1.6;
    font-size: var(--text-large);
    margin-bottom: 8px;
    color: var(--color-text);
}

.about-description {
    font-size: var(--text-base);
    margin-top: 18px;
    line-height: 1.6;
    color: var(--color-text);
    text-align: justify;
    hyphens: auto;
    max-width: 600px;
}

.about-image {
    flex-shrink: 0;
}

.image-frame {
    margin-top: 13px;
    background-color: var(--color-green);
    padding: 8px;
    border-radius: 0px;
    display: inline-block;
}

.image-frame img {
    display: block;
    width: 223px;
    height: 300px;
}

/* ==== PROJECTS SECTION STYLES ==== */

.projectGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    max-width: 75vw;
    margin: 0 auto;
}

.projectCard {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.projectImageFrame {
    background-color: var(--color-green);
    padding: 8px;
    position: relative;
    overflow: hidden;
}

.projectThumbnail {
    width: 100%;
    height: auto;
    display: block;
}

.projectTitleBar {
    background: var(--gradient-main);
    padding: 12px 16px;
    text-align: center;
}
/* .projectTitle {
    font-size: var(--text-large);
    line-height: 1.6;
    color: var(--color-text);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
} */

/* PROJECT THB HOVER */

.projectOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-green);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.projectOverlayTitle {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    margin: 0 0 12px 0;
    text-align: center;
}

.projectImageFrame:hover .projectOverlay {
    opacity: 1; /* fully visible */
}

.projectStack {
    color: white;
    font-size: var(--text-large);
    font-weight: bold;
    /* text-transform: uppercase; */
    text-align: center;
    padding: 20px;
    line-height: 1.8;
}




/* ==== EXPERIENCE SECTION STYLES ==== */

h4 {
    font-size: var(--text-large);
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.4;
    margin-bottom: 6px;
    
}

.highlight {
  background: linear-gradient(to right, 
    var(--color-green-transparent) 0%, 
    var(--color-green-transparent) 20%, 
    transparent 30%
  );
  padding: 0 2px; 
}


.underline {
    width: 100%;
    height: 2px;
    background-color: var(--color-green);
    margin: 0 auto 20px auto;
}


.cv-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem; /* adjust this for the space between dates and text */
  margin-top: 1rem;
  max-width: 1200px;

}

.cv-date {
  font-weight: 400; /* optional: make dates slightly bolder */
  white-space: nowrap; /* keeps dates from wrapping */
  min-width: 23vw;
  color: var(--color-text);
}

.cv-text {
  max-width: 640px;
  color: var(--color-text);
}

.ghost {
  color: transparent;
}

/* ==== STACK SECTION STYLES ==== */

.stack-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.stack-column {
    display: flex;
    flex-direction: column;
}

.stack-title {
    font-size: var(--text-xlarge);
    font-weight: normal;
    color: var(--color-text);
    text-transform: uppercase;
    margin-bottom: 8px;
    text-align: center;
}

.stack-separator {
    width: 65%;
    height: 2px;
    background-color: var(--color-green);
    margin: 0 auto 20px auto;
}

.stack-item {
    font-size: var(--text-large);
    color: var(--color-text);
    line-height: 1.6;
    margin-bottom: 6px;
    text-align: center;
}


/* ==== RESPONSIVE DESIGN ==== */

/* Tablet */
@media (max-width: 1024px) {
    .accordion-header {
        height: 140px;
        padding: 40px;
    }
    
    .accordion-header h2 {
        font-size: 3.5rem;
    }
    
    body.panel-open .accordion-panel:not(.active) .accordion-header {
        height: 70px;
        padding: 15px 40px;
    }
    
    body.panel-open .accordion-panel:not(.active) .accordion-header h2 {
        font-size: 1.5rem;
    }
    
    .spacer {
        height: 80px;
    }
    
    body.panel-open .spacer {
        height: 30px;
    }
    
    /* About section responsive */
    .about-container {
        gap: 40px;
    }
    
    .typewriter {
        font-size: 2.5rem;
    }
    
    .about-name {
        font-size: 1.5rem;
    }
    
    .about-role {
        font-size: 1.1rem;
    }

    /* Projects Secrion responsive */
    
     .projectGrid {
        grid-template-columns: repeat(2, 1fr);
    }


    /* Stack section responsive */
    .stack-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .stack-column {
        margin-bottom: 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .accordion-header {
        height: 100px;
        padding: 30px;
    }
    
    .accordion-header h2 {
        font-size: 2.5rem;
    }
    
    body.panel-open .accordion-panel:not(.active) .accordion-header {
        height: 50px;
        padding: 10px 30px;
    }
    
    body.panel-open .accordion-panel:not(.active) .accordion-header h2 {
        font-size: 1.2rem;
    }
    
    .accordion-content {
        padding: 0 30px;
    }
    
    .accordion-panel.active .accordion-content {
        padding: 30px;
    }
    
    .spacer {
        height: 50px;
    }
    
    body.panel-open .spacer {
        height: 20px;
    }
    
    /* About section mobile - stack vertically */
    .about-container {
        flex-direction: column-reverse;
        gap: 30px;
        align-items: center;
    }
    
    .about-text {
        text-align: center;
    }
    
    .typewriter {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .about-name {
        font-size: 1.3rem;
    }
    
    .about-role {
        font-size: 1rem;
    }
    
    .about-description {
        font-size: 0.9rem;
    }

    /* Projects Section mobile */

     .projectGrid {
        grid-template-columns: 1fr;
    }

    /* Experience section mobile */

    .cv-grid {
        grid-template-columns: 1fr; 
        gap: 0.5rem; 
    }
    
    .cv-date {
        min-width: auto; 
    }
    
    /* Stack section mobile */
    .stack-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .stack-title {
        font-size: 1.5rem;
    }
    
    .stack-item {
        font-size: 1rem;
    }
}
