/* === styles/style.css === */

/* --- 1. Root & Variables --- */
:root {
    --colour-bg-navy: #09111E;
    --colour-text-cloud: #CBD5E1;
    --colour-accent-cyan: #06B6D4;
    --colour-text-muted: #64748B;
    --colour-grid-line: rgba(255, 255, 255, 0.03);
    
    --font-primary: 'Plus Jakarta Sans', sans-serif;
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--colour-bg-navy);
    color: var(--colour-text-cloud);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden; /* Prevents scrolling on a fixed holding page */
    
    /* Architectural Grid Overlay */
    background-image: 
        linear-gradient(var(--colour-grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--colour-grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
}

/* --- 3. Holding Page Layout & Animations --- */
.fade-in-on-load {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.holding-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 2rem;
}

.holding-content {
    max-width: 680px;
    text-align: center;
    z-index: 10;
}

.academic-eyebrow {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--colour-text-muted);
    margin-bottom: 1rem;
}

.headline {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--colour-accent-cyan);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    min-height: 4.5rem; 
}

.intro-lead {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--colour-text-cloud);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.intro-detail {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--colour-text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--colour-text-cloud);
    transition: all 0.2s ease-in-out;
}

.social-link svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.social-link:hover {
    color: var(--colour-bg-navy);
    background-color: var(--colour-accent-cyan);
    border-color: var(--colour-accent-cyan);
    transform: translateY(-2px);
}

.minimal-footer {
    position: absolute;
    bottom: 2rem;
    left: 0;
    width: 100%;
    text-align: center;
}

.minimal-footer p {
    font-size: 0.875rem;
    color: var(--colour-text-muted);
}

/* Media Queries for Mobile Screens */
@media (max-width: 768px) {
    .headline {
        font-size: 2.5rem;
        min-height: 3.5rem;
    }
    .intro-lead {
        font-size: 1.25rem;
    }
    .intro-detail {
        font-size: 1rem;
    }
}


/* --- 4. Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 100;
    transition: background-color 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(16, 22, 42, 0.85); /* 85% opacity of --colour-bg-light */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--colour-white);
    text-decoration: none;
    font-weight: 700;
}

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

.nav-item {
    margin-left: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--colour-text);
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--colour-light-blue);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.nav-link:hover,
.nav-link.active {
    color: var(--colour-light-blue);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* --- 5. Hero Section --- */
.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%; /* Taller for parallax */
    background-image: url('../images/background/lines.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
}
/* Dark Overlay for Hero BG */
.hero-parallax-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--colour-dark-blue);
    opacity: 0.7; /* 70% overlay */
    z-index: 1;
}

#hero-3d-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-content {
    background: rgba(10, 15, 30, 0.3);
    padding: 2.5rem;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    z-index: 1;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 4.5rem; /* Increased size */
    color: var(--colour-white);
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 2.25rem; /* Increased size */
    font-family: var(--font-mono);
}

/* Hero Slide-up Animation */
.hero-slide-up {
    animation: slideUp 1s ease-out 0.5s both;
}
.hero-slide-up h1 {
    animation: slideUp 1s ease-out 0.5s both;
}
.hero-slide-up p {
    animation: slideUp 1s ease-out 0.7s both; /* Staggered delay */
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Typewriter Cursor */
.typewriter {
    border-right: 4px solid var(--colour-light-blue);
    animation: blink 0.75s step-end infinite;
}

@keyframes blink {
    from, to { border-color: transparent }
    50% { border-color: var(--colour-light-blue); }
}


/* --- 6. About Me Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.about-photo-wrapper {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    position: relative;
    border-radius: 45px; /* "Squircle" shape */
    overflow: hidden; /* Needed for overlay */
}

.about-photo {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

/* Purple overlay for photo */
.about-photo-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--colour-purple);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.about-photo-wrapper:hover::after {
    opacity: 0; /* Fade out overlay on hover */
}
.about-photo-wrapper:hover .about-photo {
    transform: scale(1.05); /* Zoom image on hover */
}


.about-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.icon-link svg {
    fill: var(--colour-text-darker);
    width: 28px;
    height: 28px;
    transition: fill 0.3s ease, transform 0.3s ease;
}

.icon-link:hover svg {
    fill: var(--colour-light-blue);
    transform: scale(1.1);
}

.btn {
    display: inline-block;
    background-color: var(--colour-purple);
    color: var(--colour-white);
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn:hover {
    background-color: var(--colour-light-blue);
    transform: translateY(-2px);
}

.about-right h3 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--colour-white);
    margin-bottom: 1rem;
}

.about-right p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--colour-text);
}

.about-right h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--colour-white);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.toolkit-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.toolkit-item {
    background-color: var(--colour-bg-light);
    border: 1px solid #1a223f;
    border-radius: 5px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.toolkit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(138, 79, 255, 0.2);
    border-color: var(--colour-purple);
}

.toolkit-item i {
    font-size: 2.5rem;
    color: var(--colour-light-blue);
}

/* Hugging Face SVG Mask */
.toolkit-svg-mask {
    width: 40px;
    height: 40px;
    background-color: var(--colour-light-blue);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    margin: 0 auto 5px auto;
}
.hf-logo {
    -webkit-mask-image: url('../images/vector/hf-logo-pirate.svg');
    mask-image: url('../images/vector/hf-logo-pirate.svg');
}

.toolkit-item span {
    display: block;
    margin-top: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

/* --- 7. Portfolio Section --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.project-card {
    background-color: var(--colour-bg-light);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #1a223f;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 191, 255, 0.15);
}

/* Wrapper to hold image and overlay */
.project-image-wrapper {
    width: 100%;
    height: 220px; /* Fixed height for all cards */
    position: relative;
    overflow: hidden;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills space */
    display: block;
    transition: transform 0.3s ease;
}

/* Purple overlay for project cards */
.project-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--colour-purple);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-image-wrapper::after {
    opacity: 0; /* Fade out overlay */
}

.project-card:hover .project-image {
    transform: scale(1.05); /* Zoom image */
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-family: var(--font-heading);
    color: var(--colour-white);
    margin-bottom: 0.5rem;
}

.project-info p {
    font-size: 0.95rem;
    color: var(--colour-text-darker);
    margin-bottom: 1rem;
    min-height: 3em; /* Give p a min height */
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tags span {
    background-color: rgba(138, 79, 255, 0.2);
    color: var(--colour-purple);
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
}

/* --- 8. Portfolio Modals --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--colour-bg-light);
    margin: 10% auto;
    padding: 2rem;
    border: 1px solid var(--colour-purple);
    border-radius: 10px;
    width: 80%;
    max-width: 700px;
    position: relative;
    animation: fadeInModal 0.3s ease;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-close {
    color: var(--colour-text-darker);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--colour-light-blue);
}

.modal-content h2 {
    font-family: var(--font-heading);
    color: var(--colour-white);
    margin-bottom: 1.5rem;
}

.modal-image {
    width: 100%;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    height: 300px;
    object-fit: cover;
}

.modal-content h3 {
    font-family: var(--font-heading);
    color: var(--colour-purple);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-content ul {
    list-style-position: inside;
    margin-bottom: 1.5rem;
}

.modal-links {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

/* --- 9. Contact Section --- */
.contact-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--colour-text-darker);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 5px;
    border: 1px solid #1a223f;
    background-color: var(--colour-dark-blue);
    color: var(--colour-text);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--colour-purple);
    box-shadow: 0 0 0 3px rgba(138, 79, 255, 0.3);
}

.btn-submit {
    border: none;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 1rem;
}

#form-status {
    margin-top: 1rem;
    font-weight: 500;
}
#form-status.success {
    color: var(--colour-light-blue);
}
#form-status.error {
    color: #ff6b6b;
}

.contact-info h3 {
    font-family: var(--font-heading);
    color: var(--colour-white);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    text-decoration: none;
    color: var(--colour-text);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.contact-link svg {
    fill: var(--colour-text);
    width: 24px;
    height: 24px;
    transition: fill 0.3s ease;
}

.contact-link:hover,
.contact-link:hover svg {
    color: var(--colour-light-blue);
    fill: var(--colour-light-blue);
}

/* --- 10. Footer --- */
footer {
    text-align: center;
    padding: 2rem 0;
    background-color: var(--colour-bg-light);
    margin-top: 4rem;
}

footer p {
    color: var(--colour-text-darker);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

/* --- 11. Scroll-to-Top Button --- */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--colour-purple);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.3s;
    z-index: 99;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: var(--colour-light-blue);
    transform: translateY(-5px);
}

.scroll-to-top img {
    width: 24px;
    height: 24px;
}

/* --- 12. On-Scroll Animations --- */
.content-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.content-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 13. Responsive Design --- */

@media (max-width: 992px) {
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr 1fr;
    }

    .about-left {
        order: 1;
    }
    .about-right {
        order: 2;
    }
    .contact-info {
        order: 1;
        margin-bottom: 3rem;
    }
    .contact-form-wrapper {
        order: 2;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    .hero-content p {
        font-size: 1.5rem;
    }

    /* Mobile Nav (simple toggle) */
    .nav-menu {
        display: none; /* Hide for a real JS-based toggle */
    }

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

    .toolkit-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .toolkit-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 1.5rem;
    }
}