:root {
    --accent: rgb(174, 88, 3);
    --bg: #1b1a1a;
    --card-bg: rgba(0, 0, 0, 0.4);
    --text: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 1. The Main Container: Ensure both sides stretch to the same height */
.hero-wrapper {
    display: flex;
    flex-direction: row;
    align-items: stretch; /* Forces the image side and text side to be equal height */
    justify-content: center;
    gap: 3rem; 
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* 2. The Text Side: Make this a flex column so the card can grow */
.welcome-area {
    flex: 1;
    max-width: 500px;
    display: flex;
    flex-direction: column;
}

.hero-card p, 
.project-info p {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-top: .75rem;
    margin-bottom: 1.5rem;

    /* THE FIXES */
    text-align: left;        /* Removes the forced spacing that causes breaks */
    hyphens: none;           /* Disables automatic dash insertion */
    word-break: normal;      /* Prevents words from breaking mid-character */
    overflow-wrap: normal;   /* Ensures long words don't snap unless necessary */
}

/* Ensure bold text pops in the theme color */
.project-info strong {
    color: var(--accent);
    font-weight: 600;
}

/* 2. Documentation Link Styling */
.doc-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    margin-top: none; /* Pushes the link to the bottom of the flex box */
}

.doc-link:hover {
    color: var(--text);
    transform: translateX(5px);
}

.doc-link i {
    font-size: 0.8rem;
}

/* 3. Minor refinement to the "Welcome" title for balance */
.glitch-text {
    font-size: clamp(3rem, 10vw, 5.5rem);
    margin-bottom: 0.5rem;
}

/* 4. The Description Box: Tell it to fill the remaining vertical space */
.hero-card {
    flex-grow: 1; /* This pushes the bottom of the card down to match the image */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Keeps the text centered within the growing box */
    margin-top: 1.5rem; /* Space between "Welcome" and the box */
    background: var(--card-bg);
}

/* Ensure the wrapper aligns items and allows them to stretch to the same height */
.hero-wrapper {
    display: flex;
    /* Other existing styles... */
    align-items: stretch; /* This should be the default, but good to be explicit */
}

/* Optimized Reveal Box */
.hero-image-box {
    position: relative;
    flex: 1;
    max-width: 450px;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    cursor: none; /* Changed to none because we will make a custom "lens" */
    border-radius: 12px;
    border: 2px solid var(--accent);
    align-self: center;
    background: #000;
    /* This ensures GPU acceleration */
    transform: translateZ(0); 
}

.reveal-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    /* Use CSS Variables for the position */
    clip-path: circle(var(--mask-size, 0%) at var(--mouse-x, 50%) var(--mouse-y, 50%));
    /* Remove the clip-path transition - it's the main cause of lag! */
    transition: none; 
    will-change: clip-path;
}

.headshot {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the photo fills the stretched box without distorting */
    object-position: center top;
    border-radius: 8px;
    border: 2px solid var(--accent);
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scroll Snap */
.scroll-container {
    height: 100vh;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
}

.panel {
    min-height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 10%;
    position: relative;
}

/* Backgrounds */
.hero-bg {
    background: linear-gradient(rgba(27,26,26,0.8), rgba(27,26,26,0.8)), 
                url('images/background.png') center/cover no-repeat;
}

/* Header Navigation */
.main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(27, 26, 26, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--accent);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}

.fa-korvue { color: var(--accent); font-size: 2rem; }

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

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.nav-links a:hover { color: var(--accent); }

/* Typography */
h1 { font-size: clamp(3rem, 10vw, 6rem); margin-bottom: 1rem; }
.accent { color: var(--accent); }
.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 3rem;
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent);
}

/* The Corners Aesthetic */
.corners {
    position: relative;
    padding: 2.5rem;
    background: var(--card-bg);
    max-width: 800px;
}

.corner-line {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent);
}

.top-left { top: 0; left: 0; border-right: none; border-bottom: none; }
.bottom-right { bottom: 0; right: 0; border-left: none; border-top: none; }

/* Skills Grid */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* Adjusted min-width */
    gap: 1.5rem;
    width: 100%;
    max-width: 1200px;
}

/* Ensure the Certification box looks consistent with the rest */
.cert-item-box {
    background: #000;
    padding: 0.8rem;
    font-size: 0.85rem;
    border-radius: 4px;
    width: 100%;
    text-align: center;
    color: var(--text);
    cursor: default;
    transition: var(--transition);

}

.cert-item-box:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 15px rgba(174, 88, 3, 0.4);
}

/* Re-applying the Equal Height logic for your Welcome section from before */
.hero-wrapper {
    display: flex;
    align-items: stretch; /* Keeps description box and image same height */
    gap: 2rem;
}

.hero-card {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.skill-category {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(174, 88, 3, 0.1);
    transition: var(--transition);
}

.skill-category:hover {
    border-color: var(--accent);
    background: rgba(174, 88, 3, 0.05);
    transform: translateY(-10px);
}

.skill-category h3 {
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-item {
    background: #000;
    padding: 0.5rem 1rem;
    border: 1px solid #333;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: default;
    transition: var(--transition);
}

/* The Glow Effect */
.skill-item:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 15px rgba(174, 88, 3, 0.4);
}

/* JavaScript Reveal Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Contact Grid */
/* 1. Make the contact panel taller */
#contact.panel {
    padding: 8rem 10%; /* Doubled the top/bottom padding */
    justify-content: flex-start; /* Aligns content better as it grows */
}

/* 2. Expand the grid and add more breathing room */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Larger boxes */
    gap: 2.5rem;
    width: 100%;
    max-width: 1200px;
    margin-top: 4rem;
}

/* 3. Transform boxes into interactive cards */
.contact-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(174, 88, 3, 0.2);
    padding: 3.5rem 2rem;
    border-radius: 15px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.contact-box:hover {
    background: rgba(174, 88, 3, 0.05);
    border-color: var(--accent);
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

CSS
/* 1. Color the main icons (Email, Link, Resume) */
/* Note: using the > selector ensures we target only the direct icon child */
.contact-box > i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent); /* THE FIX: Forces the orange color */
}

/* 2. Color and animate the social media link icons */
.social-icons a {
    color: var(--accent); /* THE FIX: Sets initial color to orange */
    font-size: 2.5rem;
    transition: var(--transition);
    display: inline-block; /* Needed for transform to work */
}

/* A professional hover state for socials */
.social-icons a:hover {
    color: var(--text); /* Turn white on hover */
    transform: translateY(-5px); /* Subtle lift effect */
    filter: drop-shadow(0 0 8px var(--accent)); /* Adds an orange glow */
}

/* 3. Style the box titles for professional hierarchy */
.contact-box h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Style for the email link to match the theme */
.email-link {
    color: var(--text);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    transition: var(--transition);
}

.contact-box:hover .email-link {
    color: var(--accent);
}

/* 1. Change Grid to Flex and Force Alignment */
.project-showcase {
    display: flex;
    flex-direction: row;
    align-items: stretch; /* This makes the image and info box equal height */
    justify-content: center;
    gap: 3rem;
    width: 100%;
    max-width: 1100px;
    margin-bottom: 8rem;
}

/* 2. Setup the Info Box to Grow */
.project-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically centers the text within the matched height */
    max-width: 500px;
    background: var(--card-bg);
    /* padding is already handled by your .corners class */
}

/* 3. Setup the Image Box to Match */
.project-img-box {
    flex: 1;
    max-width: 500px;
    display: flex; /* Ensures the anchor/image inside can stretch */
}

.project-img-box a {
    width: 100%;
    display: flex;
}

.project-img-box img {
    width: 100%;
    height: 100%; /* Important: tells image to fill the stretched container */
    object-fit: cover; /* Prevents the screenshot from looking squished */
    border-radius: 8px;
    border: 2px solid rgba(174, 88, 3, 0.3);
    transition: var(--transition);
}

.project-img-box img:hover {
    filter: grayscale(0%);
    border-color: var(--accent);
    transform: scale(1.02);
}

/* Ensure info box text doesn't feel too wide */
.project-info {
    max-width: 500px;
}

.rift-project {
    color: rgb(174, 88, 3);
}

.resume-link {
    color: rgb(174, 88, 3);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    /* 1. Disable Scroll Snap for smoother mobile browsing */
    .scroll-container {
        scroll-snap-type: none;
        height: auto;
    }

    .panel {
        scroll-snap-align: none;
        min-height: auto;
        padding: 5rem 5% 3rem 5%; /* More breathing room */
    }

    /* 2. Stack the Hero Section */
    .hero-wrapper {
        flex-direction: column-reverse; /* Puts the text above the image */
        align-items: center;
        gap: 2rem;
    }

    .welcome-area, .hero-image-box {
        max-width: 100%;
        width: 100%;
    }

    .glitch-text {
        text-align: center;
    }

    /* 3. Stack Project Showcases */
    .project-showcase, 
    .project-showcase:nth-child(even) {
        flex-direction: column; /* Forces vertical stacking */
        gap: 1.5rem;
        margin-bottom: 5rem;
    }

    .project-img-box, .project-info {
        max-width: 100%;
        width: 100%;
    }

    /* 4. Navigation Refinement */
    .nav-links {
        gap: 1rem;
    }
    
    .nav-links a {
        font-size: 0.75rem; /* Smaller text to fit the screen width */
    }

    .logo span {
        display: none; /* Hides "Norlander" to save space, keeping just the icon */
    }

    /* 5. Contact Grid Adjustments */
    .contact-grid {
        grid-template-columns: 1fr; /* Single column for contact cards */
        gap: 1.5rem;
    }

    .contact-box {
        padding: 2rem 1rem;
    }
}

@media (max-width: 768px) {
    .main-nav {
        top: auto;
        bottom: 0; /* Moves nav to the bottom */
        border-bottom: none;
        border-top: 1px solid var(--accent);
    }
}