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

:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --accent-color-1: #333333;
    /* Borders, secondary */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    --spacing-container: 2rem;
    --transition-speed: 0.3s;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 2rem 0;
}

.name {
    font-size: clamp(3rem, 8vw, 8rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    line-height: 1.1;
    position: relative;
}

.name::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--text-color);
}

.tagline {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 300;
    margin-top: 3rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Skills Section */
.skills {
    padding: 6rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 4rem;
    margin-top: 4rem;
}

.skill-card {
    text-align: center;
    padding: 2rem;
    transition: transform 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
}

.skill-number {
    font-size: 4rem;
    font-weight: 200;
    opacity: 0.2;
    margin-bottom: 1rem;
}

.skill-title {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.skill-description {
    font-size: 1rem;
    line-height: 1.8;
    opacity: 0.7;
    max-width: 300px;
    margin: 0 auto;
}

/* About Section */
.about {
    padding: 6rem 0;
}

.about-content {
    display: grid;
    gap: 4rem;
    align-items: center;
}

.about-image {
    background: url('img/glenn-hofman.png') no-repeat center center;
    background-size: cover;
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid var(--accent-color-1);
    filter: grayscale(100%);
    -webkit-filter: grayscale(100%);
    border-radius: 10px;
}



.about-text {
    font-size: 1.1rem;
    line-height: 1.9;
    opacity: 0.9;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Divider */
.divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--text-color), transparent);
    margin: 4rem 0;
    opacity: 0.2;
}

/* Footer */
.footer {
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid var(--accent-color-1);
}

.contact {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    padding-bottom: 5px;
    transition: opacity 0.3s ease;
}

.link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-color);
    transition: width 0.3s ease;
}

.link:hover::after {
    width: 100%;
}

.link:hover {
    opacity: 0.6;
}

/* Animated background elements */
.bg-element {
    position: fixed;
    opacity: 0.08;
    pointer-events: none;
    z-index: -1;
}

.bg-element-1 {
    top: 10%;
    left: 10%;
    width: 200px;
    height: 200px;
    animation: floatRotate1 20s infinite ease-in-out;
}

.bg-element-2 {
    top: 60%;
    right: 15%;
    width: 150px;
    height: 150px;
    animation: floatRotate2 15s infinite ease-in-out reverse;
}

.bg-element-3 {
    bottom: 20%;
    left: 20%;
    width: 100px;
    height: 100px;
    animation: floatRotate3 25s infinite ease-in-out;
}

@keyframes floatRotate1 {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(180deg);
    }
}

@keyframes floatRotate2 {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(-180deg);
    }
}

@keyframes floatRotate3 {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(180deg);
    }
}


/* Responsive */
@media (max-width: 768px) {
    .skills {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .name {
        font-size: 3rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Scroll animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.skill-card {
    animation: fadeInUp 0.6s ease-out;
}

.skill-card:nth-child(1) {
    animation-delay: 0.1s;
}

.skill-card:nth-child(2) {
    animation-delay: 0.2s;
}

.skill-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Scroll Animation Classes */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.visible {
    opacity: 1;
    transform: none;
}

/* Stagger delays for skill cards if they are all in view */
.skill-card.fade-in-section {
    transition-delay: 0.1s;
}

.skill-card:nth-child(2).fade-in-section {
    transition-delay: 0.2s;
}

.skill-card:nth-child(3).fade-in-section {
    transition-delay: 0.3s;
}

/* Typing Effect */
.typing-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* 3D Tilt Effect */
.skills {
    perspective: 1000px;
    /* needed for 3D tilt */
}

.skill-card {
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform;
    /* transition: transform 0.1s ease; Removed to start with JS control */
}

/* Mouse Parallax */
.bg-element {
    transition: transform 0.1s ease-out;
    /* Smooth follow */
}

/* Staggered Name Reveal */
.name-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px) rotate(-10deg);
    animation: revealChar 0.5s forwards cubic-bezier(0.5, 0, 0.5, 1);
}

@keyframes revealChar {
    to {
        opacity: 1;
        transform: translateY(0) rotate(0);
    }
}
