/* --- GLOBAL VARIABLES --- */
:root {
    --bg-dark: #05070a;
    --card-bg: rgba(17, 24, 39, 0.7);
    --accent-blue: #3ea6ff;
    --text-main: #ffffff;
    --text-dim: #a0a6b3;
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 85%;
    max-width: 1100px;
    margin: auto;
}

/* --- NAVIGATION --- */
nav {
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(5, 7, 10, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
}

.logo span {
    color: var(--accent-blue);
}

#sidemenu {
    display: flex;
    list-style: none;
    gap: 40px;
}

#sidemenu li a {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

#sidemenu li a:hover {
    color: var(--accent-blue);
}

nav .fa-solid {
    display: none;
    font-size: 22px;
    cursor: pointer;
}

/* --- HERO SECTION & TRANSITION --- */
.hero-bg {
    height: 100vh;
    display: flex;
    align-items: center;
    /* BETTER TRANSITION: Fades from transparent-ish to solid black at the bottom */
    background: linear-gradient(
        to bottom, 
        rgba(5, 7, 10, 0.4) 0%, 
        rgba(5, 7, 10, 0.7) 70%, 
        var(--bg-dark) 100%
    ), 
    url("Photos/Ari_Craik_Web.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}


.pre-title {
    color: var(--accent-blue);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.hero-content h1 {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 800;
    margin-bottom: 25px;
}

.hero-content h1 span {
    color: var(--accent-blue);
}

.hero-btns {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn.primary {
    background: var(--accent-blue);
    color: white;
}

.btn.secondary {
    border: 1px solid var(--glass-border);
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(62, 166, 255, 0.2);
}

/* --- ABOUT SECTION --- */
section {
    padding: 100px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 60px;
    align-items: center;
}

.about-img img {
    width: 100%;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

.line {
    width: 60px;
    height: 4px;
    background: var(--accent-blue);
    margin: 15px 0 30px 0;
}

.skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.skill-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
}

.skill-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--accent-blue);
}

.skill-card p {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* --- PROJECTS SECTION & ZOOM --- */
#portfolio {
    background: var(--bg-dark);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    /* Set transition for the whole box */
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.project-card img {
    width: 100%;
    height: auto;
    display: block;
}

.proj-info {
    padding: 25px;
}

.proj-info h3 {
    margin-bottom: 10px;
}

.proj-info p {
    color: var(--text-dim);
}

/* ENTIRE BOX ZOOM EFFECT */
.project-card:hover {
    transform: scale(1.05); /* Zooms the whole box */
    border-color: var(--accent-blue);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    z-index: 2;
}

/* --- CONTACT SECTION --- */
.contact-container {
    text-align: center;
    background: linear-gradient(145deg, #0f172a, #05070a);
    padding: 80px 40px;
    border-radius: 40px;
    border: 1px solid var(--glass-border);
}

.email-wrapper {
    position: relative;
    display: inline-block;
}

.email-link {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    font-size: clamp(1.2rem, 4vw, 2.2rem);
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
}

#copy-msg {
    display: none;
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-blue);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 50px 0;
    color: #4b5563;
}

/* --- MOBILE --- */
@media (max-width: 900px) {
    nav .fa-solid { display: block; }
    #sidemenu {
        position: fixed;
        top: 0;
        right: -220px;
        background: #0f172a;
        width: 220px;
        height: 100vh;
        flex-direction: column;
        padding: 80px 30px;
        transition: 0.4s;
    }
    .about-grid { grid-template-columns: 1fr; text-align: center; }
}
/* Fix for zoomed-in hero image on mobile */
@media (max-width: 900px) {
    .hero-bg {
        background-attachment: scroll; /* Disables the fixed effect that causes zooming */
        background-position: center center;
    }
}