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

:root {
    --bg: #0a0a0b;
    --bg2: #111113;
    --bg3: #18181b;
    --border: rgba(255, 255, 255, 0.08);
    --text: #e4e4e7;
    --text2: #a1a1aa;
    --text3: #52525b;
    --green: #22c55e;
    --green-glow: rgba(34, 197, 94, 0.15);
    --yellow: #eab308;
    --red: #ef4444;
    --cyan: #22d3ee;
    --purple: #a78bfa;
    --font: 'Inter', -apple-system, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

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

a {
    color: inherit;
    text-decoration: none;
}

::selection {
    background: rgba(34, 197, 94, 0.25);
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--bg3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text3);
}

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

.highlight {
    color: var(--green);
    font-weight: 500;
}

/* === PROGRESS BAR === */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green), var(--cyan));
    z-index: 200;
    transition: width 0.15s ease;
    box-shadow: 0 0 10px var(--green-glow);
}

/* === NAV === */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s;
}

.nav.scrolled {
    padding: 12px 0;
    background: rgba(10, 10, 11, 0.95);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--green);
    object-fit: cover;
    transition: transform 0.3s;
}

.nav-logo:hover .nav-avatar {
    transform: scale(1.1);
}

.logo-text {
    background: linear-gradient(135deg, var(--text), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--green);
    transition: width 0.3s;
}

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

.nav-links a:hover::after {
    width: 100%;
}

.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);
    transition: all 0.3s;
}

/* === HERO === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at top, rgba(34, 197, 94, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(34, 211, 238, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 100%;
    min-height: 400px;
}

.sonar-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sonar-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.1);
    animation: sonar-ripple 4s infinite linear;
}

.sonar-circle:nth-child(1) { width: 100%; height: 100%; animation-delay: 0s; }
.sonar-circle:nth-child(2) { width: 100%; height: 100%; animation-delay: -1s; }
.sonar-circle:nth-child(3) { width: 100%; height: 100%; animation-delay: -2s; }
.sonar-circle:nth-child(4) { width: 100%; height: 100%; animation-delay: -3s; }

.sonar-core {
    width: 70px;
    height: 70px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 40px var(--green);
    z-index: 2;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sonar-core svg {
    width: 36px;
    height: 36px;
    color: var(--bg);
}

.radar-line {
    position: absolute;
    width: 2px;
    height: 160px;
    background: var(--green);
    top: 0;
    left: 160px;
    transform-origin: bottom center;
    animation: radar-spin 4s infinite linear;
    z-index: 1;
    box-shadow: 0 0 15px var(--green);
}

.radar-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--green), 0 0 20px var(--green);
    z-index: 2;
    transform: translate(-50%, -50%);
    animation: radar-ping 2s ease-out forwards;
}

@keyframes radar-ping {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    80% { opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

@keyframes sonar-ripple {
    0% { transform: scale(0.2); opacity: 1; border-color: rgba(34, 197, 94, 0.8); }
    100% { transform: scale(1.5); opacity: 0; border-color: rgba(34, 197, 94, 0); }
}

@keyframes radar-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    font-family: var(--mono);
    color: var(--green);
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: blink 2s infinite;
    box-shadow: 0 0 8px var(--green);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text) 0%, var(--text2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-subtitle {
    font-family: var(--mono);
    font-size: 1.1rem;
    color: var(--green);
    margin-bottom: 24px;
    min-height: 1.6em;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.typing-text {
    border-right: 2px solid var(--green);
    animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: var(--green);
    }
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--text2);
    max-width: 600px;
    line-height: 1.8;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font);
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: var(--green);
    color: #09090b;
    box-shadow: 0 4px 20px var(--green-glow);
}

.btn-primary:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--green-glow);
}

.btn-secondary {
    background: var(--bg2);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--green);
    color: var(--green);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.5s both;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-num {
    font-family: var(--mono);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--green);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === SECTIONS === */
section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
}

.section-tag {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--green);
    padding: 6px 12px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 6px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* === ABOUT === */
.about {
    background: var(--bg);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.about-text p {
    color: var(--text2);
    font-size: 1rem;
    line-height: 1.9;
    margin-bottom: 20px;
}

.about-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.card-dots {
    display: flex;
    gap: 6px;
}

.card-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.card-dots span:nth-child(1) {
    background: #ff5f57;
}

.card-dots span:nth-child(2) {
    background: #febc2e;
}

.card-dots span:nth-child(3) {
    background: #28c840;
}

.card-title {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text3);
}

.card-body {
    padding: 20px;
    font-family: var(--mono);
    font-size: 0.85rem;
    line-height: 2;
}

.code-line {
    display: flex;
    gap: 8px;
}

.code-key {
    color: var(--cyan);
}

.code-val {
    color: var(--text2);
}

.code-green {
    color: var(--green);
}

.currently-section {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

.currently-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
    font-family: var(--mono);
}

.currently-items {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.curr-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.88rem;
    color: var(--text2);
    transition: all 0.2s;
}

.curr-item:hover {
    border-color: var(--green);
    transform: translateY(-2px);
}

.curr-icon {
    font-size: 1.2rem;
}

/* === WORK === */
.work {
    background: var(--bg2);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.work-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.work-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--green), var(--cyan));
    transform: scaleX(0);
    transition: transform 0.3s;
}

.work-card:hover {
    border-color: rgba(34, 197, 94, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.work-card:hover::before {
    transform: scaleX(1);
}

.work-card.featured {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--bg), rgba(34, 197, 94, 0.03));
}

.wc-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 12px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 100px;
    font-size: 0.7rem;
    font-family: var(--mono);
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.wc-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 197, 94, 0.08);
    border-radius: 12px;
    color: var(--green);
    margin-bottom: 20px;
}

.wc-icon.small {
    width: 40px;
    height: 40px;
}

.wc-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.wc-desc {
    font-size: 0.9rem;
    color: var(--text2);
    line-height: 1.7;
    margin-bottom: 20px;
}

.wc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.wc-tags span {
    padding: 5px 12px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text3);
    font-family: var(--mono);
}

.wc-tags .tag-star {
    background: rgba(234, 179, 8, 0.08);
    color: var(--yellow);
    border-color: rgba(234, 179, 8, 0.2);
}

.wc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--green);
    font-weight: 500;
    transition: gap 0.2s;
}

.wc-link:hover {
    gap: 10px;
}

.work-footer {
    text-align: center;
}

/* === SKILLS === */
.skills {
    background: var(--bg);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

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

.skill-card:hover {
    border-color: rgba(34, 197, 94, 0.2);
    transform: translateY(-4px);
}

.skill-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 197, 94, 0.08);
    border-radius: 12px;
    color: var(--green);
    margin-bottom: 20px;
}

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

.skill-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-card li {
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--text2);
    font-family: var(--mono);
    transition: all 0.2s;
}

.skill-card li:hover {
    border-color: rgba(34, 197, 94, 0.2);
    color: var(--green);
}

/* === TERMINAL === */
.terminal-section {
    background: var(--bg2);
}

.terminal-hint {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--text3);
    margin-bottom: 24px;
}

.terminal-hint code {
    background: var(--bg);
    padding: 3px 10px;
    border-radius: 4px;
    color: var(--green);
    border: 1px solid var(--border);
}

.terminal {
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 750px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.term-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #161b22;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.term-dots {
    display: flex;
    gap: 8px;
}

.term-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.term-dots span:nth-child(1) {
    background: #ff5f57;
}

.term-dots span:nth-child(2) {
    background: #febc2e;
}

.term-dots span:nth-child(3) {
    background: #28c840;
}

.term-title {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text3);
}

.term-body {
    padding: 24px;
    font-family: var(--mono);
    font-size: 0.85rem;
    line-height: 1.9;
    min-height: 200px;
    max-height: 350px;
    overflow-y: auto;
}

.term-body::-webkit-scrollbar {
    width: 5px;
}

.term-body::-webkit-scrollbar-thumb {
    background: var(--text3);
    border-radius: 3px;
}

.term-line {
    white-space: pre-wrap;
    margin-bottom: 4px;
}

.t-green {
    color: var(--green);
}

.t-cyan {
    color: var(--cyan);
}

.t-red {
    color: var(--red);
}

.t-yellow {
    color: var(--yellow);
}

.t-purple {
    color: var(--purple);
}

.t-dim {
    color: var(--text3);
}

.t-white {
    color: var(--text);
}

.term-input-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #161b22;
}

.term-prompt {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--green);
    white-space: nowrap;
    flex-shrink: 0;
}

.term-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.85rem;
    outline: none;
    caret-color: var(--green);
}

.term-input::placeholder {
    color: var(--text3);
}

/* === CONTACT === */
.contact {
    background: var(--bg);
}

.contact-desc {
    font-size: 1rem;
    color: var(--text2);
    margin-bottom: 32px;
    max-width: 500px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s;
    color: var(--text2);
}

.contact-card:hover {
    border-color: rgba(34, 197, 94, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.contact-card svg:first-child {
    flex-shrink: 0;
    color: var(--text3);
    transition: color 0.3s;
}

.contact-card:hover svg:first-child {
    color: var(--green);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.contact-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.contact-handle {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text3);
}

.contact-arrow {
    opacity: 0;
    transition: all 0.3s;
    flex-shrink: 0;
    color: var(--text3);
}

.contact-card:hover .contact-arrow {
    opacity: 1;
    transform: translate(3px, -2px);
    color: var(--green);
}

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

.footer p {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text3);
}

/* === RESPONSIVE === */
@media (max-width: 968px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        padding: 20px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-title {
        font-size: 2.5rem;
    }

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

    .hero-stats {
        gap: 24px;
    }

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

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

    .work-card.featured {
        grid-column: span 1;
    }

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

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

    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .currently-items {
        flex-direction: column;
    }
}