/* ============================================
   AK-Dev Portfolio - Main Stylesheet
   ============================================ */

:root {
    --primary: #00ff88;
    --primary-dim: rgba(0, 255, 136, 0.15);
    --secondary: #0ea5e9;
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a25;
    --text-primary: #f0f0f5;
    --text-secondary: #8888aa;
    --text-dim: #555570;
    --border: #2a2a3a;
    --border-light: #3a3a4a;
    --glow: rgba(0, 255, 136, 0.4);
    --glow-blue: rgba(14, 165, 233, 0.4);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ============================================
   Background Effects
   ============================================ */

.bg-grid {
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -2;
}

.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
}

.bg-glow-1 {
    top: -200px;
    right: -200px;
    background: var(--primary);
}

.bg-glow-2 {
    bottom: -200px;
    left: -200px;
    background: var(--secondary);
}

#network-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.4;
}

/* ============================================
   Navigation
   ============================================ */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-highlight {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

/* ============================================
   Hero Section
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-dim);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.8rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--glow);
}

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

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================
   Section Styles
   ============================================ */

section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   About Section
   ============================================ */

.about {
    padding-top: 2rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.about-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.about-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.highlight-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.highlight-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.about-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    justify-content: center;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   Profile Image with Animations
   ============================================ */

.profile-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.profile-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
    border-radius: 50%;
    animation: profileGlow 3s ease-in-out infinite;
}

@keyframes profileGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.profile-ring {
    position: absolute;
    inset: -15px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: ringRotate 8s linear infinite;
}

.profile-ring::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    transform: translateX(-50%);
}

.profile-ring-2 {
    inset: -25px;
    border-color: var(--secondary);
    opacity: 0.2;
    animation-duration: 6s;
    animation-direction: reverse;
}

.profile-ring-3 {
    inset: -35px;
    border-color: var(--primary);
    opacity: 0.1;
    animation-duration: 10s;
}

@keyframes ringRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.profile-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary);
    z-index: 2;
}

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

.profile-container:hover .profile-image {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.profile-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: orbit 8s linear infinite;
}

.particle:nth-child(1) { animation-delay: 0s; }
.particle:nth-child(2) { animation-delay: -2s; }
.particle:nth-child(3) { animation-delay: -4s; }
.particle:nth-child(4) { animation-delay: -6s; }

@keyframes orbit {
    from {
        transform: rotate(0deg) translateX(160px) rotate(0deg);
    }
    to {
        transform: rotate(360deg) translateX(160px) rotate(-360deg);
    }
}

/* ============================================
   Skills Grid
   ============================================ */

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

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.skill-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.skill-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    padding: 0.35rem 0.75rem;
    background: var(--bg-dark);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ============================================
   Experience Timeline
   ============================================ */

.experience-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
}

.experience-item {
    position: relative;
    padding-left: 2.5rem;
    padding-bottom: 3rem;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid var(--bg-dark);
}

.experience-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.experience-item h3 {
    font-size: 1.35rem;
    margin-bottom: 0.25rem;
}

.experience-company {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.experience-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.experience-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.experience-tech span {
    padding: 0.3rem 0.7rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ============================================
   Projects Grid
   ============================================ */

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

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-image {
    height: 180px;
    background: linear-gradient(135deg, var(--bg-darker), var(--bg-card));
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
}

.project-icon {
    font-size: 4rem;
}

.project-content {
    padding: 1.5rem;
}

.project-type {
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-stack span {
    padding: 0.3rem 0.6rem;
    background: var(--bg-dark);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ============================================
   Contact Section
   ============================================ */

.contact {
    padding: 6rem 2rem;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
    align-items: start;
}

.contact-headline {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.contact-headline span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.contact-highlights {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-highlight {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.contact-highlight:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}

.contact-highlight-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-highlight-text {
    font-weight: 600;
    color: var(--text-primary);
}

.contact-highlight-text span {
    display: block;
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.contact-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--primary);
    color: var(--bg-dark);
    font-weight: 700;
    font-size: 1rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px var(--glow);
}

/* Terminal Style */
.contact-terminal {
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

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

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

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27ca40; }

.terminal-title {
    margin-left: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.terminal-body {
    padding: 1.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
}

.terminal-line {
    display: flex;
    gap: 0.5rem;
}

.terminal-prompt {
    color: var(--primary);
}

.terminal-command {
    color: var(--text-primary);
}

.terminal-output {
    padding-left: 1rem;
    color: var(--text-secondary);
}

.terminal-output.success {
    color: var(--primary);
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: var(--primary);
    margin-left: 4px;
    animation: blink 1s step-end infinite;
}

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

.contact-availability {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.availability-dot {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.availability-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.availability-text strong {
    color: var(--primary);
}

/* ============================================
   Modal
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 2rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.modal-image-container {
    height: 200px;
    background: linear-gradient(135deg, var(--bg-darker), var(--bg-card));
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.modal-project-icon {
    font-size: 5rem;
}

.modal-content {
    padding: 2rem;
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-type {
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.modal-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-dark);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.modal-meta-item {
    text-align: center;
}

.modal-meta-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.modal-meta-value {
    font-weight: 600;
    font-size: 0.9rem;
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section-title {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.modal-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.modal-motivation {
    padding: 1rem;
    background: var(--bg-dark);
    border-left: 3px solid var(--primary);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.modal-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.modal-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-dark);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.modal-feature-icon {
    font-size: 1rem;
}

.modal-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-stack span {
    padding: 0.4rem 0.8rem;
    background: var(--primary-dim);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--primary);
}

/* ============================================
   Footer
   ============================================ */

footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

footer span {
    color: var(--primary);
}

.footer-links {
    margin-top: 0.5rem;
}

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

.footer-links a:hover {
    color: var(--primary);
}

/* ============================================
   Flash Messages
   ============================================ */

.flash-message {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    z-index: 3000;
    animation: slideIn 0.3s ease, slideOut 0.3s ease 3s forwards;
}

.flash-success {
    background: rgba(0, 255, 136, 0.2);
    border: 1px solid var(--primary);
    color: var(--primary);
}

.flash-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #ef4444;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ============================================
   Animations
   ============================================ */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

/* ============================================
   Responsive
   ============================================ */

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

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

    .profile-container {
        width: 220px;
        height: 220px;
    }

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

    .modal-meta {
        grid-template-columns: 1fr;
    }

    .modal-features {
        grid-template-columns: 1fr;
    }

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

    .contact-headline {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    section {
        padding: 3rem 1rem;
    }

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

    .hero h1 {
        font-size: 2rem;
    }
}
