/* ========================================
RESET
======================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  }

  
/* ========================================
PAGE
======================================== */

html {
background-color: black;
scroll-behavior: smooth;
}

body {
color: white;
width: 100%;
min-height: 100%;
overflow-x: hidden;


/* Added: subtle page entrance */
animation: pageLoad 1.2s ease both;


}

/* ========================================
PAGE EFFECTS
======================================== */

@keyframes pageLoad {


from {
    opacity: 0;
}

to {
    opacity: 1;
}


}

/* ========================================
IMAGES
======================================== */

img {
max-width: 100%;
height: auto;
object-fit: contain;
display: block;
}

/* ========================================
IMAGE HOVER
======================================== */

.image-hover {
position: relative;
width: 100%;
margin: 0;
overflow: hidden;


/* Added: smoother visual depth */
isolation: isolate;


}

.image-link {
display: block;
width: 100%;
overflow: hidden;


/* Added */
position: relative;


}

.center-image {
display: block;
width: 100%;
height: auto;
margin: 0;
transition:
transform 0.5s ease,
filter 0.5s ease,
opacity 0.5s ease;
}

.image-link:hover .center-image {
transform: scale(1.03);
filter: brightness(0.46);
}

/* Added: subtle image movement */

.image-hover::after {


content: "";

position: absolute;

inset: 0;

pointer-events: none;

background: transparent;

opacity: 0;

transition: opacity 0.6s ease;

z-index: 1;


}

.image-hover:hover::after {


opacity: 1;


}

.image-hover-title {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
font-family: 'Times New Roman', Times, serif;
font-size: 28px;
font-weight: normal;
line-height: 1.1;
text-align: center;
width: 90%;
opacity: 0;
transition:
opacity 0.6s ease,
letter-spacing 0.6s ease,
transform 0.6s ease;
pointer-events: none;
z-index: 2;
}

.image-hover:hover .image-hover-title {
opacity: 1;


transform: translate(-50%, -50%) scale(1.01);

letter-spacing: 0.5px;


}

/* ========================================
TYPOGRAPHY
======================================== */

h1,
h2,
h3,
h4,
h5,
h6,
p,
footer {
font-family: "Google Sans Flex";
}

h1 {
font-size: 23px;
}

h2 {
font-size: 200px;
min-height: 10vh;
display: flex;
align-items: center;
justify-content: flex-start;
padding-left: 30px;
}

h3 {
font-size: 14px;
font-weight: lighter;
}

h4 {
font-size: 40px;
}

h5 {
font-size: 28px;
font-weight: 121;
font-family: "Castoro Titling";
}

h6 {
font-size: 10px;
font-weight: lighter;
}

p {
font-size: 14px;
font-weight: 500;
font-family: "Gentium Book Plus";
}

footer {
font-size: 12px;
font-weight: normal;
font-family: "Castoro Titling";
}

/* ========================================
NAVIGATION
======================================== */

.nav {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width: 100%;
padding: 0 30px;
margin-top: 30px;


/* Added: entrance */
animation: navReveal 1s ease 0.2s both;


}

@keyframes navReveal {


from {
    opacity: 0;
    transform: translateY(-8px);
}

to {
    opacity: 1;
    transform: translateY(0);
}


}

.nav-right {
display: flex;
align-items: center;
gap: 20px;
}

/* ========================================
NAVIGATION LINKS
======================================== */

.Emmanuel-Mason-Link,
.About-Me-Link,
.Work-Link,
.Discourse-Link {
font-weight: bold;
color: white;
text-decoration: none;
transition:
opacity 0.7s ease,
letter-spacing 0.5s ease,
transform 0.4s ease;
}

.Emmanuel-Mason-Link:hover,
.About-Me-Link:hover,
.Work-Link:hover,
.Discourse-Link:hover {
opacity: 0.7;
color: rgba(255, 255, 255, 0.7);
background-color: rgba(255, 255, 255, 0.04);


/* Added */
letter-spacing: 0.4px;
transform: translateY(-1px);


}

.Emmanuel-Mason-Link:visited,
.About-Me-Link:visited,
.Work-Link:visited,
.Discourse-Link:visited {
color: white;
}

/* ========================================
PORTFOLIO INTRODUCTION
======================================== */

.portfolio-intro {
text-align: center;
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;


/* Added */
animation: introReveal 1.4s ease 0.35s both;


}

@keyframes introReveal {

 
from {
    opacity: 0;
    transform: translateY(10px);
}

to {
    opacity: 1;
    transform: translateY(0);
}


}

.intro-title {
position: relative;
transform: translateY(-2.5vw);


/* Added */
transition:
    letter-spacing 0.7s ease,
    opacity 0.7s ease;


}

.intro-title:hover {


letter-spacing: 1px;


}

.portfolio-intro h3 {
margin-bottom: 6px;
}

/* ========================================
WHITE PORTFOLIO SECTION
======================================== */

.portfolio-projects {
--project-row-gap: 60px;
background-color: white;
color: black;
padding-top: 1px;
padding-bottom: 1px;
display: grid;
grid-template-columns: 1fr 1fr;
column-gap: 0;
row-gap: var(--project-row-gap);


/* Added */
position: relative;


}

/* ========================================
WELCOME
======================================== */

.welcome-section {
grid-column: 1 / -1;
width: 100%;
min-height: 40vh;
display: flex;
align-items: center;
justify-content: flex-start;
text-align: left;
overflow: hidden;
}

.welcome-section h2 {
white-space: nowrap;
animation: welcomeMove 8s linear infinite;


/* Added */
will-change: transform;


}

@keyframes welcomeMove {
from {
transform: translateX(-100%);
}


to {
    transform: translateX(100vw);
}


}

/* Added: slight interaction when hovering Welcome */

.welcome-section:hover h2 {


animation-play-state: paused;


}

/* ========================================
INDUSTRIAL DESIGN
======================================== */

.industrial-design-section {
grid-column: 1 / -1;
width: 100%;
min-height: 0vh;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
}

.industrial-design-section h5 {
padding: 0;


/* Added */
opacity: 0;
animation: industrialReveal 1.2s ease both;


}

@keyframes industrialReveal {


from {
    opacity: 0;
    letter-spacing: 3px;
    transform: translateY(5px);
}

to {
    opacity: 1;
    letter-spacing: normal;
    transform: translateY(0);
}


}

/* ========================================
PROJECTS
======================================== */

.project {
text-align: center;
margin-top: 0;
margin-bottom: 0;
min-width: 0;
padding-left: 0px;
padding-right: 0px;


/* Added */
position: relative;


}

/* Added: subtle project text interaction */

.project p {


transition:
    opacity 0.5s ease,
    transform 0.5s ease;


}

.project:hover p {


opacity: 0.65;

transform: translateY(-1px);


}

/* ========================================
PROJECT TITLES
======================================== */

.project-title {
font-family: "Almarai";
font-size: 24px;
font-weight: bolder;
text-align: center;
margin-top: 10px;
margin-bottom: 15px;
animation: titleReveal linear both;
animation-timeline: view();
animation-range: entry 0% cover 53%;


/* Added */
transition:
    letter-spacing 0.5s ease,
    transform 0.5s ease;


}

.project-title:hover {


letter-spacing: 0.7px;

transform: translateY(-1px);


}

@keyframes titleReveal {
from {
opacity: 0;
transform: translateY(8px);
}


to { 
    opacity: 1; 
    transform: translateY(0); 
} 

}

@keyframes titleRevealBlack {
from {
opacity: 0;
transform: translateY(6px);
color: black;
}


to { 
    opacity: 1; 
    transform: translateY(0); 
    color: black; 
} 


}

.portfolio-projects .project-title {
animation-name: titleRevealBlack;
}

/* ========================================
PROJECT IMAGES
======================================== */

.project-image {
display: block;
width: auto;
height: auto;
margin: 0 auto;
}

/* ========================================
BUTTONS
======================================== */

.button {
font-family: "Google Sans Flex";
display: flex;
cursor: pointer;
justify-content: center;
align-items: center;
margin: 20px auto 61.2px;
width: 150px;
height: 23px;
font-size: 12px;
font-weight: bold;
text-align: center;
text-decoration: none;
color: black;
border-radius: 10px;
background-color: transparent;
transition:
border-color 0.2s ease,
background-color 0.2s ease,
transform 0.3s ease,
letter-spacing 0.3s ease,
box-shadow 0.3s ease;
}

.button:hover {
border-color: rgba(0, 0, 0, 1);
background-color: rgba(0, 0, 0, 0.01);


/* Added */
transform: translateY(-2px);

letter-spacing: 0.5px;

box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);


}

.button:active {


transform: translateY(0);

box-shadow: none;


}

.button:visited {
color: inherit;
text-decoration: none;
}

/* ========================================
FOOTER
======================================== */

footer {
margin-top: 100vh;
margin-right: 0;
margin-bottom: 20px;
margin-left: 10px;
grid-column: 1 / -1;


/* Added */
transition:
    opacity 0.5s ease,
    letter-spacing 0.5s ease;


}

footer:hover {


opacity: 0.65;

letter-spacing: 0.3px;


}

/* ========================================
DOWN ARROW
======================================== */

.down-arrow {
display: flex;
justify-content: center;
gap: 0;
margin-top: 15px;
margin-bottom: 75px;


/* Added */
animation: arrowFloat 2.5s ease-in-out infinite;


}

@keyframes arrowFloat {


0%,
100% {
    transform: translateY(0);
}

50% {
    transform: translateY(4px);
}


}

.down-arrow span {
width: 7px;
height: 1.5px;
background: black;
}

.down-arrow span:first-child {
transform: rotate(27deg);
transform-origin: right;
}

.down-arrow span:last-child {
transform: rotate(-27deg);
transform-origin: left;
}

/* ========================================
WHITE PORTFOLIO SECTION
======================================== */

main > div {
color: black;
}

main > div .project-title {
color: black;
}

main > div .button {
color: black;
border-color: rgba(0, 0, 0, 0.75);
}

main > div .button:hover {
border-color: rgba(0, 0, 0, 1);
background-color: rgba(0, 0, 0, 0.01);
}

main > div .image-hover-title {
color: white;
}

/* ========================================
ACCESSIBILITY
======================================== */

@media (prefers-reduced-motion: reduce) {


html {
    scroll-behavior: auto;
}

*,
*::before,
*::after {

    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;

    scroll-behavior: auto !important;

}


}
