@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    /* Retro Brutalist Theme */
    --bg-color: #ffffff;
    --bg-alt: #f0f0f0;
    --text-primary: #000000;
    --text-secondary: #000000;
    --border-color: #000000;
    --border-width: 3px;
    --shadow: 6px 6px 0px #000000;
    --shadow-hover: 10px 10px 0px #000000;
    --card-bg: #ffffff;
    --nav-bg: #ffffff;
    --accent-color: #000000;
    --radius: 0px;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --bg-alt: #111111;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --border-color: #ffffff;
    --shadow: 6px 6px 0px #ffffff;
    --shadow-hover: 10px 10px 0px #ffffff;
    --card-bg: #000000;
    --nav-bg: #1a1a1a;
    --accent-color: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    font-family: inherit;
}

body {
    font-family: 'Space Grotesk', -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    border-left: var(--border-width) solid var(--border-color);
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    border-bottom: var(--border-width) solid var(--border-color);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Layout */
main {
    max-width: 1200px;
    margin: 0 auto;
}

section {
    padding: 100px 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: var(--border-width) solid var(--border-color);
}

.bg-pattern {
    background-color: var(--bg-alt);
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 6px 6px;
}

.section-title {
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -1px;
}

/* Brutalist Card System */
.retro-card {
    background: var(--card-bg);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.retro-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: var(--shadow-hover);
}

.window-header {
    border-bottom: var(--border-width) solid var(--border-color);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    background: var(--bg-alt);
    font-size: 0.8rem;
    font-weight: 600;
}

.window-dots {
    display: flex;
    gap: 0.4rem;
    margin-right: auto;
}

.window-dots span {
    width: 12px;
    height: 12px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    border: var(--border-width) solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-primary);
    box-shadow: 4px 4px 0px var(--border-color);
    transition: all 0.1s ease;
    font-family: inherit;
}

.btn:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px var(--border-color);
}

.btn-primary {
    background-color: var(--border-color);
    color: var(--bg-color);
    box-shadow: 4px 4px 0px var(--text-secondary);
}

[data-theme="dark"] .btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-color);
    box-shadow: 4px 4px 0px #555;
}

/* Hero Section */
.hero {
    position: relative;
    padding-top: 150px;
    background: var(--bg-color);
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: clamp(3.5rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.hero h2 {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 1.5rem;
    min-height: 40px;
}

.cursor {
    font-weight: 700;
    animation: blink 1s infinite steps(2, start);
}

@keyframes blink {
    to {
        visibility: hidden;
    }
}

.location {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* About & Education Section */
.about-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media(min-width: 768px) {
    .about-container {
        grid-template-columns: 3fr 2fr;
    }
}

.about-text {
    font-size: 1.2rem;
    line-height: 1.6;
    font-weight: 500;
}

.education-timeline h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.edu-item {
    padding: 1rem;
    border: var(--border-width) solid var(--border-color);
    margin-bottom: 1rem;
    background: var(--card-bg);
}

.edu-degree {
    font-weight: 700;
    font-size: 1.1rem;
}

.edu-inst {
    font-weight: 500;
}

.edu-meta {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.5rem;
    border-top: 2px dashed var(--border-color);
    padding-top: 0.5rem;
}

/* Technical Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    padding: 0;
}

.skill-content {
    padding: 1.5rem;
}

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    font-weight: 700;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background: var(--bg-alt);
    border: 2px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Experience Section */
.experience {
    background-color: var(--bg-alt);
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 6px 6px;
}

.timeline-grid {
    display: grid;
    gap: 2rem;
}

.exp-item {
    background: var(--bg-color);
}

.exp-content {
    padding: 2rem;
}

.exp-role {
    font-size: 1.5rem;
    font-weight: 700;
}

.exp-company {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.exp-duration {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border: 2px solid var(--border-color);
}

.exp-list {
    list-style-type: square;
    padding-left: 1.5rem;
}

.exp-list li {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Projects Section */
.projects {
    background: var(--bg-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    display: flex;
    flex-direction: column;
}

.project-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.project-desc {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 600;
}

.project-tech span {
    background: var(--bg-alt);
    border: 2px solid var(--border-color);
    padding: 0.2rem 0.5rem;
}

.project-links a {
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
}

/* Achievements Section */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.achievement-card {
    padding: 2rem;
    text-align: center;
}

.achievement-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.achievement-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.achievement-org {
    font-weight: 600;
}

/* Contact Section */
.contact-container {
    max-width: 800px;
    padding: 3rem;
    text-align: center;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.2rem;
    padding: 1rem 2rem;
    border: var(--border-width) solid var(--border-color);
    background: var(--bg-color);
    box-shadow: 4px 4px 0px var(--border-color);
    transition: all 0.1s;
}

.contact-item:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px var(--border-color);
}

.contact-item i {
    font-size: 1.5rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    border-top: var(--border-width) solid var(--border-color);
    background: var(--nav-bg);
    font-weight: 600;
}

/* Transitions for Scroll Anim */
.hidden-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.show-section {
    opacity: 1;
    transform: translateY(0);
}

/* Quick Links Grid */
.quick-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: var(--border-width) solid var(--border-color);
    margin: 2rem 0;
}

.quick-link-item {
    padding: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-right: var(--border-width) solid var(--border-color);
    background: var(--bg-color);
    transition: background 0.2s;
}

.quick-link-item:last-child {
    border-right: none;
}

.quick-link-item:hover {
    background: var(--bg-alt);
}

.quick-link-item::after {
    content: '↗';
    font-size: 1.2rem;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
    .quick-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-link-item:nth-child(even) {
        border-right: none;
    }

    .quick-link-item:nth-child(1),
    .quick-link-item:nth-child(2) {
        border-bottom: var(--border-width) solid var(--border-color);
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: -100%;
        flex-direction: column;
        background: var(--nav-bg);
        width: 100%;
        padding: 2rem;
        transition: left 0.3s ease;
        border-bottom: var(--border-width) solid var(--border-color);
    }

    .nav-links.active {
        left: 0;
    }

    .hamburger {
        display: block;
    }

    .hero {
        padding-top: 120px;
    }

    .hero h1 {
        font-size: 2.8rem;
        letter-spacing: -1px;
    }
}

/* Error Toast Warning */
.toast {
    position: fixed;
    bottom: -150px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--text-primary);
    color: var(--bg-color);
    padding: 1rem 2rem;
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow);
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000;
    width: 90%;
    max-width: 500px;
    font-weight: 600;
}

.toast i {
    margin-right: 0.5rem;
}

.toast.show {
    bottom: 20px;
}