/* ===== GLOBAL ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    background: linear-gradient(160deg, #0D0D0D, #121212 70%);

    * {
        box-sizing: border-box;
    }
}

a {
    text-decoration: none;
    color: var(--accent);
}

.a-white {
    color: var(--text);
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 12rem;
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem 10%;
    z-index: 999;
    border-bottom: 1px solid var(--border);
}

header a {
    text-decoration: none;
    color: var(--text);
}

.homepage-link {
	display: flex;
	font-style: inherit;
	text-decoration: none;
	justify-content: space-between;
	align-items: center;
    height: 7.5rem;

    padding: 0.5rem 1rem;
}

.logo {
	width: auto;
	max-width: 100%;
	height: 100%;
}

#nav {
    position: relative;
    width: 100%;
    padding: 0.5rem 1rem;
}

/* ===== NAVBAR ===== */
.navbar {
    width: 100%;
    display: flex;
    justify-content: start;
    align-items: center;
}

.nav-logo {
    font-size: 1.4rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
}

.nav-links a {
    color: var(--text);
    font-weight: 500;
    transition: 0.2s;
}

.nav-links a:hover {
    color: var(--accent);
}

/* ===== BURGER ===== */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.burger span {
    width: 28px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: 0.3s;
}

/* ===== MOBILE NAV ===== */
.mobile-nav {
    display: none;
    list-style: none;
    background: var(--bg-card);
    padding: 20px;
    position: fixed;
    top: 12.625rem;
    right: 0.625rem;
    width: 200px;
    border-radius: 10px;
    border: 1px solid var(--border);
    z-index: 5;
}

.mobile-nav a {
    color: white;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}



/* ===== MAIN ===== */

main {
    min-height: calc(100vh - 12rem - 9rem);
    width: 100%;
    margin-top: 12rem;
    padding: 1rem 10%;
    
    display: flex;
    flex-direction: row;
    justify-content: start;
    align-items: center;
}

#content {
    height: 100%;
    width: 100%;

    display: flex;
    flex-direction: column;
}



/* ===== HERO ===== */
.hero {
    height: 100%;
    display: flex;
    align-items: center;
}

.typing-container {
    font-size: 3rem;
    margin-bottom: 20px;
}

.typing {
    color: var(--accent);
    border-right: 3px solid var(--accent);
    animation: blink 0.7s infinite;
}

@keyframes blink {
    50% { border-color: transparent; }
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Button */
.btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.2s;
}

.btn:hover {
    background: var(--accent-hover);
}



/* ===== SECTIONS ===== */
.section {
    padding: 3rem 0;
}

.section h2 {
    margin-bottom: 1.25rem;
    font-size: 2rem;
}

/* ===== SKILLS ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.skill-card {
    background: var(--bg-card);
    padding: 1.25rem;
    text-align: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: transform 0.2s, border-color 0.2s;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.skill-card:hover {
    transform: translateY(-0.25rem);
    border-color: var(--accent);
}



/* ===== PROJECTS (3D Hover) ===== */
.projects-grid {
    display: grid;
    gap: 1.25rem;
    margin-top: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
}

.project-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;

    /* 3D settings */
    transform-style: preserve-3d;
    perspective: 50rem;
    transition: transform 0.15s ease, border-color 0.3s;
    will-change: transform;
}

.project-card:hover {
    border-color: var(--accent);
}

.project-card h3,
.project-card p {
    position: relative;
    z-index: 3;
}

.project-img {
    height: 140px;
    background: linear-gradient(135deg, #0e0e0e, #1e1e1e);
    border-radius: 8px;
    margin-bottom: 1rem;

    /* Smooth card highlight when rotating */
    box-shadow: 0 0 0 rgba(0,0,0,0);
    transition: box-shadow 0.3s;
}

.project-card:hover .project-img {
    box-shadow: 0 0 2.5rem rgba(58, 125, 255, 0.25);
}

/* ===== FOOTER ===== */
.footer {
    width: 100%;
    height: 9rem;
    text-align: center;
    padding: 2.5rem 0;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}



/* ===== RESPONSIVE ===== */
@media (max-width: 850px) {
    .nav-links {
        display: none;
    }
    .burger {
        display: flex;
    }
    .navbar {
        width: 100%;
        justify-content: end;
    }
}



/* ===== FORMS ===== */

.form-container {
    width: 100%;
    height: 2rem;

    padding: 0;
    margin: 0.5rem 0;

    display: flex;
    flex-direction: column;
}

.form-container input {
    width: 100%;
    height: 2rem;

    margin: 0;
    padding: 0 0 0 1rem;

    border: 1px solid var(--border);
    border-radius: 0.8rem;
    background-color: var(--bg);

    color: var(--text);
}

.form-placeholder {
    width: 100%;
    height: 2rem;

    pointer-events: none;
    padding: 0;
    margin: -1.9rem 0 0 1rem;
    z-index: +5;

    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}



/* ===== POPUP =====*/

#popup-overlay {
    position: absolute;
    z-index: +50;
    width: 100vw;
    height: calc(100vh - 12rem - 9rem);
    top: 12rem;
    left: 0;

    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;

    background: none;

    opacity: 0.75;
}

#popup {
    width: 25%;
    height: 25%;
    
    border: 1px solid var(--border);
    border-radius: 0.8rem;

    background-color: var(--bg-card);

    padding: 1rem;

    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
}

#popup-buttons {
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
}