:root {
    --bg-color: #050505;
    --text-color: #f0f0f0;
    --accent-color: #ffffff;
    --dim-color: #888888;
    --border-color: #333333;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    cursor: none; /* For custom cursor */
}

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

/* Custom Cursor */
.cursor-dot, .cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
}
.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-color);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}
.cursor-outline.hover {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    mix-blend-mode: difference;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 4rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(5,5,5,1) 0%, rgba(5,5,5,0) 100%);
}

.back-link {
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--dim-color);
}

.social-links a {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-left: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--dim-color);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8rem 4rem 4rem;
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70vh;
    gap: 4rem;
}

.hero-text {
    flex: 1;
}

.overline {
    font-family: var(--font-heading);
    color: var(--dim-color);
    letter-spacing: 5px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 6rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 1rem;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

/* Glitch Effect */
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}
.glitch::before {
    left: 2px;
    text-shadow: -1px 0 white;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}
.glitch::after {
    left: -2px;
    text-shadow: -1px 0 white;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(21px, 9999px, 86px, 0); }
    20% { clip: rect(5px, 9999px, 88px, 0); }
    40% { clip: rect(69px, 9999px, 53px, 0); }
    60% { clip: rect(80px, 9999px, 78px, 0); }
    80% { clip: rect(46px, 9999px, 12px, 0); }
    100% { clip: rect(81px, 9999px, 12px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(23px, 9999px, 66px, 0); }
    20% { clip: rect(35px, 9999px, 18px, 0); }
    40% { clip: rect(79px, 9999px, 93px, 0); }
    60% { clip: rect(10px, 9999px, 28px, 0); }
    80% { clip: rect(56px, 9999px, 32px, 0); }
    100% { clip: rect(91px, 9999px, 42px, 0); }
}


.hero .subtitle {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 2px;
}
.hero .subtitle .dim {
    color: var(--dim-color);
    font-size: 1rem;
}

.hero-image-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    overflow: hidden;
    filter: grayscale(100%) contrast(1.2);
    border: 2px solid var(--border-color);
    border-radius: 50%;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-image-wrapper:hover .hero-image {
    transform: scale(1.05);
}

.overlay-scan {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.1) 50%, rgba(255,255,255,0));
    background-size: 100% 4px;
    animation: scan 8s linear infinite;
    pointer-events: none;
}

@keyframes scan {
    0% { background-position: 0 -100vh; }
    100% { background-position: 0 100vh; }
}

/* Divider */
.divider {
    height: 1px;
    width: 100%;
    background-color: var(--border-color);
    margin: 4rem 0;
}

/* Section Headings */
h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 3px;
    margin-bottom: 2rem;
    color: var(--dim-color);
}

/* Summary */
.summary .lead {
    font-size: 1.5rem;
    line-height: 1.8;
    max-width: 1000px;
    font-weight: 300;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.skill-category h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.skill-category ul {
    list-style: none;
}
.skill-category li {
    padding: 0.5rem 0;
    color: var(--dim-color);
    transition: color 0.3s ease;
}
.skill-category li:hover {
    color: var(--accent-color);
}

/* Marquee */
.marquee {
    margin: 6rem 0;
    background: var(--text-color);
    color: var(--bg-color);
    padding: 1.5rem 0;
    overflow: hidden;
    position: relative;
    display: flex;
    width: 100%;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    white-space: nowrap;
    transform: rotate(-2deg) scale(1.05);
}

.marquee-content {
    display: flex;
    align-items: center;
    animation: marquee 20s linear infinite;
}

.marquee-content span {
    margin: 0 2rem;
}
.marquee-content i {
    font-size: 1rem;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Bento Grid (Experience & Education) */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.bento-item {
    border: 1px solid var(--border-color);
    padding: 3rem;
    transition: background-color 0.3s ease;
}

.bento-item:hover {
    background-color: rgba(255,255,255,0.02);
}

.bento-item.experience {
    grid-column: 1 / -1;
}

.timeline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.timeline-item h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.timeline-item p {
    color: var(--dim-color);
    margin-bottom: 0.5rem;
}
.timeline-item p strong {
    color: var(--accent-color);
}

.strengths {
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.strengths h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}
.strength-list {
    list-style: none;
}
.strength-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--dim-color);
}
.strength-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.edu-card {
    margin-bottom: 2rem;
}
.edu-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}
.edu-card .inst {
    color: var(--dim-color);
}
.edu-card .date {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--dim-color);
    margin-top: 0.5rem;
    letter-spacing: 1px;
}

.cert-list {
    list-style: none;
}
.cert-list li {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--border-color);
}
.cert-list li:last-child {
    border-bottom: none;
}
.cert-list li strong {
    font-size: 1.1rem;
}
.cert-list li span {
    color: var(--dim-color);
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

/* Footer */
.portfolio-footer {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-heading);
    color: var(--dim-color);
    font-size: 0.9rem;
    letter-spacing: 2px;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    .hero-image-wrapper {
        width: 100%;
        max-width: 400px;
    }
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .timeline {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 6rem 2rem 2rem;
    }
    .navbar {
        padding: 1.5rem 2rem;
    }
    .hero h1 {
        font-size: 3rem;
    }
    .summary .lead {
        font-size: 1.2rem;
    }
    .cursor-dot, .cursor-outline {
        display: none; /* Hide custom cursor on mobile */
    }
}
