html { scroll-behavior: smooth; }

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

:root {
    --bg-primary: #111111;
    /* --bg-secondary: #161616; */
    --bg-secondary: #141414;
    --text-primary: #e0e0e0;
    --text-secondary: #888888;
    --accent: rgb(100, 108, 255);
    --accent-bright: #80e5ff;
    --accent-bright-border: rgba(128, 230, 255, 0.1);
    --border: #2a2a2a;
}

body {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.gradient-border {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #646cff, #42b883, #646cff);
    background-size: 200% 100%;
    animation: gradient-shift 3s ease infinite;
    z-index: 2147483647;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

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

header {
    margin-top: 4rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

nav {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

nav a:hover {
    color: var(--text-primary);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

section {
    margin: 3rem 0;
}

h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.experience {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: visible;
}

.experience:hover {
    transform: translateX(4px);
    border-color: var(--accent);
}

.experience h3 {
    font-size: 1.2rem;
    font-weight: 400;
}

.experience h4 {
    font-size: 1rem;
    font-weight: 400;
    margin-top: -.3rem;
}

.experience p {
    color: var(--text-secondary);
    margin-top: .3rem;
    margin-bottom: 1rem;
}
.experience li {
    color: var(--text-secondary);
    margin-top: .3rem;
    margin-bottom: 1rem;
}

.project {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
    
}

.project:hover {
    transform: translateX(4px);
    border-color: var(--accent);
}

.project h3 {
    font-size: 1.2rem;
    font-weight: 400;
}

.project p {
    color: var(--text-secondary);
    margin-top: .3rem;
    margin-bottom: 1rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: first baseline;
    flex-wrap: wrap;
    
}

.project-header h4 {
    font-size: 1rem;
    font-weight: 400;
}

.project-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-button {
    display: flex;
    text-decoration: none;
    position: relative;
    font-size: 0.85rem;
    color: var(--accent-bright);
    background-color: rgba(100, 108, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border: 1px solid rgba(128, 230, 255, 0.25);
    border-radius: 10px;
    transition: transform 0.2s ease, border-color 0.2s ease;

}

.project-button:hover {
    color: rgb(211, 246, 255);
    border-color: var(--accent-bright);
    transform: translateY(-2px)
}

.tech-stack {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.tech {
    font-size: 0.85rem;
    color: var(--accent);
    background-color: rgba(100, 108, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border: 1px solid rgba(100, 108, 255, 0.3);
}

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

.skill-category h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.contact-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.contact-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

footer {
    margin-top: 6rem;
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fade-in 0.6s ease-out;
}

.sparkly {
    display: inline-block;
    position: relative;
    font-weight: bold;
    cursor: pointer;
    isolation: isolate;
    transition: color 0.3s ease;
    z-index: 0;
}

.sparkly:hover {
    color: var(--accent);
}

.sparkle {
    position: absolute;
    display: block;
    animation: spin 1000ms linear, comeInOut 1000ms forwards;
    pointer-events: none;
    /* z-index determined by js */
}

@keyframes comeInOut {
    0%   { transform: scale(0); opacity: 0; }
    50%  { transform: scale(1); opacity: 1; }
    100% { transform: scale(0); opacity: 0; }
}

@keyframes spin {
    from {rotate: 0deg; }
    to {rotate: 180deg; }
}