/* === Reset & Variables === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #0f1420;
    --bg-card: #131a2b;
    --bg-card-hover: #182035;
    --green: #00ff88;
    --green-dim: #00cc6a;
    --green-glow: rgba(0, 255, 136, 0.15);
    --cyan: #00d4ff;
    --cyan-dim: #0099cc;
    --blue: #4a9eff;
    --purple: #a78bfa;
    --yellow: #fbbf24;
    --red: #ff5f57;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-dim: #64748b;
    --border: #1e293b;
    --font-mono: 'Fira Code', 'Courier New', monospace;
    --font-sans: 'Inter', -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

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

/* === Scanline & Noise Effects === */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 136, 0.015) 2px,
        rgba(0, 255, 136, 0.015) 4px
    );
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* === Container === */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === Navbar === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 60px;
    background: rgba(10, 14, 23, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--green);
}

.nav-logo .prompt {
    color: var(--cyan);
    margin-right: 6px;
}

.nav-logo .cursor {
    animation: blink 1s step-end infinite;
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

.nav-links a::before {
    content: './';
    color: var(--text-dim);
}

.nav-links a:hover {
    color: var(--green);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-secondary);
    transition: 0.3s;
}

/* === Hero / Terminal === */
.hero {
    padding: 120px 0 60px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.terminal-window {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 40px var(--green-glow);
    max-width: 750px;
    margin: 0 auto;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-left: 12px;
}

.terminal-body {
    padding: 28px 24px;
}

.typing-line {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prompt {
    color: var(--cyan);
    font-family: var(--font-mono);
}

.typed-text {
    color: var(--green);
}

.blink-cursor {
    color: var(--green);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-output {
    opacity: 0;
    transition: opacity 0.5s ease;
    text-align: center;
}

.hero-output.visible {
    opacity: 1;
}

.profile-photo {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--green);
    box-shadow: 0 0 15px var(--green-glow);
    margin: 0 auto 1rem;
    display: block;
}

.hero-output h1 {
    font-family: var(--font-mono);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--green);
    text-shadow: 0 0 20px var(--green-glow);
    margin-bottom: 4px;
}

.hero-output .subtitle {
    font-size: 1.15rem;
    color: var(--cyan);
    margin-bottom: 2px;
}

.hero-output .location {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.link-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.82rem;
    font-family: var(--font-mono);
    transition: all 0.2s;
}

.link-chip:hover {
    border-color: var(--green-dim);
    color: var(--green);
    box-shadow: 0 0 12px var(--green-glow);
}

.link-icon {
    color: var(--cyan);
    font-weight: 700;
}

/* === Sections === */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--bg-secondary);
}

.section-title {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--green);
    margin-bottom: 40px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.section-title .prompt {
    margin-right: 8px;
}

/* === Skills === */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    transition: all 0.3s;
}

.skill-card:hover {
    border-color: var(--green-dim);
    box-shadow: 0 0 20px var(--green-glow);
    transform: translateY(-2px);
}

.skill-header {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--cyan);
    margin-bottom: 16px;
}

.folder-icon {
    color: var(--yellow);
    margin-right: 4px;
}

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

.skill-list li {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 4px 0;
}

.bullet {
    color: var(--green-dim);
    margin-right: 8px;
}

/* === Timeline / Experience === */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--green), var(--cyan), var(--blue));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -29px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--green);
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 10px var(--green-glow);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    transition: all 0.3s;
}

.timeline-content:hover {
    border-color: var(--green-dim);
    box-shadow: 0 0 16px var(--green-glow);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.job-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.job-company {
    font-size: 0.9rem;
    color: var(--cyan);
    margin-top: 2px;
}

.job-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--green-dim);
    white-space: nowrap;
}

.job-duties {
    list-style: none;
}

.job-duties li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.job-duties li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--green-dim);
    font-family: var(--font-mono);
    font-weight: 700;
}

/* === Projects === */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    transition: all 0.3s;
}

.project-card:hover {
    border-color: var(--green-dim);
    box-shadow: 0 0 20px var(--green-glow);
    transform: translateY(-2px);
}

.project-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.project-header h3 {
    font-size: 1.05rem;
    color: var(--text-primary);
}

.project-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 3px 10px;
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 4px;
    color: var(--green);
}

.project-details {
    list-style: none;
}

.project-details li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.project-details li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--cyan);
    font-family: var(--font-mono);
}

/* === Education === */
.education-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 28px;
}

.edu-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.edu-header h3 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.edu-program {
    color: var(--cyan);
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.edu-location {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.edu-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.gpa {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--green);
    font-weight: 600;
}

/* === Contact Form === */
.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--cyan);
}

.form-group input,
.form-group textarea {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 16px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-dim);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--green-dim);
    box-shadow: 0 0 12px var(--green-glow);
}

.contact-submit {
    align-self: flex-start;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 12px 28px;
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid var(--green-dim);
    border-radius: 6px;
    color: var(--green);
    cursor: pointer;
    transition: all 0.2s;
}

.contact-submit:hover {
    background: rgba(0, 255, 136, 0.15);
    box-shadow: 0 0 16px var(--green-glow);
}

.contact-submit .prompt {
    margin-right: 6px;
}

.contact-note {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    min-height: 1.2em;
}

.contact-note.success {
    color: var(--green);
}

.contact-note.error {
    color: var(--red);
}

/* === Footer === */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--green-dim);
}

.footer-sub {
    margin-top: 8px;
    font-size: 0.8rem !important;
    color: var(--text-dim) !important;
}

/* === Scroll Animations === */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 14, 23, 0.97);
        padding: 20px 32px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-output h1 {
        font-size: 1.8rem;
    }

    .hero-links {
        flex-direction: column;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .job-header,
    .edu-header {
        flex-direction: column;
    }

    .edu-meta {
        align-items: flex-start;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 16px;
    }

    .section {
        padding: 60px 0;
    }
}
