:root {
    --bg-color: #181818;
    --text-color: #cccccc;
    --surface-color: #1f1f1f;
    --muted-text-color: #9d9d9d;
    --accent-color: #4daafc;
    --button-bg-color: #0078d4;
    --button-hover-bg-color: #026ec1;
    --button-text-color: #ffffff;
    --border-color: #2b2b2b;
    --status-online-color: #3fb950;
    --status-offline-color: #f85149;
    /* VS Code Dark Modern syntax colors */
    --code-keyword-color: #569cd6;
    --code-variable-color: #4fc1ff;
    --code-property-color: #9cdcfe;
    --code-string-color: #ce9178;
}

body {
    display: flex;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: system-ui, sans-serif;
    margin: 0;
    padding: 1rem;
    padding-top: max(1rem,env(safe-area-inset-top)); 
    position: relative;
    min-height: 100vh;
    box-sizing: border-box;
    flex-direction: column;
}

main {
    flex-grow: 1;
}

.hero-intro {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 400;
    margin: 0.25rem 0 0.5rem 0;
}

h1 {
    font-size: clamp(2.5rem, 10vw, 5.5rem);
    font-weight: 700;
    line-height: 0.9;
    margin: 0.25rem 0 1rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

p { 
    color: var(--muted-text-color);
    max-width: 65ch;
}

.hero-tagline {
    color: var(--text-color);
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Shared by both hero buttons */
.button {
    display: inline-block;
    padding: 1rem 1.2rem;
    border-radius: 5px;
    color: var(--button-text-color);
    text-decoration: none;
    transition: 0.3s ease;
}

.button:hover,
.button:focus-visible {
    filter: brightness(1.2);
}

/* Visible ring for keyboard users */
.button:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

.resume-link {
    background-color: var(--button-bg-color);
}

.project-link {
    /* the red end is darkened so white text passes 4.5:1 contrast */
    background-image: linear-gradient(135deg, rgb(31, 81, 255), rgb(138, 43, 226), rgb(209, 0, 47));
}

@property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.avatar-ring {
    --ring: 5px; /* Thickness of the ring */
    width: 200px; /* Set a fixed width for the ring */
    aspect-ratio: 1; /* This ensures the ring maintains a square aspect ratio */
    padding: var(--ring); /* This creates space for the ring around the avatar */
    border-radius: 50%; /* This makes the ring circular */
    background: conic-gradient( 
        from var(--angle), /* This makes the gradient rotate based on the --angle variable */
        #22d3ee,
        #3b82f6,
        #7c3aed,
        #d946ef,
        #ec4899,
        #22d3ee
    );
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.45); /* This adds a glow effect to the ring */
    animation: spin 6s linear infinite; /* This makes the ring spin continuously */
    flex-shrink: 0; /* This prevents the ring from shrinking in a flex container */
}

.avatar {
    width: 100%; /* This makes the avatar fill the ring */
    aspect-ratio: 1;  /* This ensures the avatar maintains a square aspect ratio */
    border-radius: 50%;
    object-fit: cover; /* This ensures the avatar image covers the entire area without distortion */
    display: block; /* This removes any default inline spacing */ 
    border: 4px solid var(--bg-color);
    box-sizing: border-box; /* This ensures the border is included in the element's total width and height */
}

.hero-photo {
    position: relative;
    margin-right: 21.5rem;
}

.code-card {
    position: absolute;
    top: -4rem;
    left: 70%;
    background-color: rgb(31 31 31 / 0.85);
    border: 1px solid rgb(255 255 255 / 0.08);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.apple-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 0.75rem;
}

.apple-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.apple-dots span:nth-child(1) {background-color: #ff5f57;}
.apple-dots span:nth-child(2) {background-color: #febc2e;}
.apple-dots span:nth-child(3) {background-color: #28c840;}

.code-card pre {
    margin: 0;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.5;
}

.code-card .keyword { color: var(--code-keyword-color); }
.code-card .variable { color: var(--code-variable-color); }
.code-card .string { color: var(--code-string-color); }
.code-card .property { color: var(--code-property-color); }

@keyframes spin {
    to { --angle: 360deg;}
}

.about {
    margin-top: 4rem;
}

.hero {
    display: flex;
    gap: 1.25rem;
    justify-content: space-between;
    align-items: center;
}

.skills {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.skills li {
    color: var(--button-text-color);
    padding: .3rem 0.8rem;
    border-radius: 999px; /* Fully rounded pill shape */
    font-size: 0.875rem;
}

.skills li:nth-child(5n+1) { background: #0e7490;}
.skills li:nth-child(5n+2) { background: #1d4ed8;}
.skills li:nth-child(5n+3) { background: #6d28d9;}
.skills li:nth-child(5n+4) { background: #a21caf;}
.skills li:nth-child(5n+5) { background: #be185d;}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 5rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.footer p {
    margin: 0;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 999px;
}

.status-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    margin-right: 0.4rem;
    border-radius: 50%;
    background-color: var(--status-online-color);
    box-shadow: 0 0 6px var(--status-online-color);
}

.glows {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
}

.glow-top-left {
    width: 32rem;
    height: 32rem;
    top: -14rem;
    left: -10rem;
    background-image: radial-gradient(circle, rgb(236 72 153 / 0.65), transparent 70%);
}

.glow-top-middle {
    width: 20rem;
    height: 20rem;
    top: -13rem;
    left: 38%;
    background-image: radial-gradient(circle, rgb(34 211 238 / 0.5), transparent 70%);
}

/* The main light: shines down from the top right onto the photo */
.glow-top-right {
    width: 34rem;
    height: 34rem;
    top: -8rem;
    right: 8%;
    background-image: radial-gradient(circle, rgb(124 58 237 / 0.75), transparent 70%);
}

.glow-bottom-middle {
    width: 40rem;
    height: 40rem;
    bottom: -22rem;
    left: 45%;
    background-image: radial-gradient(circle, rgb(217 70 239 / 0.5), transparent 70%);
}

.snowflakes {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.snowflakes span {
    position: absolute;
    width: 0.25rem;
    height: 0.25rem;
    background-color: rgb(255 255 255 / 0.6);
    border-radius: 50%;
    animation: fall linear infinite;
}

.snowflakes span:nth-child(1) { left: 7%; animation-duration: 8s; animation-delay: -0s; width: 2px; height: 2px; top: 35%; }
.snowflakes span:nth-child(2) { left: 23%; animation-duration: 10s; animation-delay: -1s; width: 2px; height: 2px; top: 25%; }
.snowflakes span:nth-child(3) { left: 38%; animation-duration: 12s; animation-delay: -2s; width: 3px; height: 3px; top: 15%; }
.snowflakes span:nth-child(4) { left: 52%; animation-duration: 9s; animation-delay: -3s; width: 3px; height: 3px; top: 45%; }
.snowflakes span:nth-child(5) { left: 66%; animation-duration: 11s; animation-delay: -4s; width: 2px; height: 2px; top: 60%; }
.snowflakes span:nth-child(6) { left: 79%; animation-duration: 10s; animation-delay: -5s; width: 3px; height: 3px; top: 70%; }
.snowflakes span:nth-child(7) { left: 88%; animation-duration: 13s; animation-delay: -6s; width: 3px; height: 3px; top: 80%; }
.snowflakes span:nth-child(8) { left: 95%; animation-duration: 9s; animation-delay: -7s; width: 2px; height: 2px; top: 90%; }

@keyframes fall {
    0% { transform: translateY(-100vh); }
    100% { transform: translateY(100vh); }
}
@media (max-width: 1040px){
    .hero {
        flex-direction: column;
    }
    .hero-text {
        text-align: center;
    }
    .skills,
    .hero-actions {
        justify-content: center;
    }
    .hero-photo {
        margin-top: 5rem;
    }
}

@media (max-width: 600px){
    /* Smaller glows pushed to the edges so the hero isn't one wash */
    .glow {
        width: 70vw;
        height: 70vw;
    }
    .glow-top-left {
        top: -30vw;
        left: -35vw;
    }
    .glow-top-right {
        top: -20vw;
        right: -30vw;
    }
    .glow-top-middle {
        display: none;
    }
    .footer {
        flex-direction: column;
        text-align: center;
    }
    .server-status {
        flex-direction: column;
        gap: 0.25rem;
        border-radius: 1rem;
    }
    .avatar-ring {
        width: 150px;
    }
    .code-card {
        top: -2.5rem;
        left: 68%;
        padding: 0.6rem 0.75rem;
    }
    .apple-dots {
        margin-bottom: 0.5rem;
    }
    .apple-dots span {
        width: 8px;
        height: 8px;
    }
    .code-card pre {
        font-size: 0.45rem;
    }
    .hero-photo {
        margin-top: 3.5rem;
        margin-right: 10.5rem;
    }
}

@media (prefers-reduced-motion: reduce){
    .avatar-ring {animation: none;}
}

/* Visitors who ask for more contrast get a plain background */
@media (prefers-contrast: more){
    .glows {display: none;}
}
