/* ==========================================
   MODERN PORTFOLIO - CSS
   ========================================== */

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

/* ==========================================
   CSS Variables
   ========================================== */
:root {
    /* Colors */
    --color-bg: #ffffff;
    --color-bg-secondary: #f9fafb;
    --color-text: #1a1a2e;
    --color-text-secondary: #6b7280;
    --color-accent: #2563eb;
    --color-accent-hover: #1d4ed8;
    --color-accent-light: #dbeafe;
    --color-border: #e5e7eb;
    --color-success: #10b981;
    
    /* Dark Mode Colors */
    --dark-bg: #0f0f1e;
    --dark-bg-secondary: #1a1a2e;
    --dark-text: #f5f5f5;
    --dark-text-secondary: #9ca3af;
    --dark-accent: #60a5fa;
    --dark-border: #2d2d44;
    
    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Effects */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s ease-out;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);
}

html.dark {
    --color-bg: var(--dark-bg);
    --color-bg-secondary: var(--dark-bg-secondary);
    --color-text: var(--dark-text);
    --color-text-secondary: var(--dark-text-secondary);
    --color-accent: var(--dark-accent);
    --color-border: var(--dark-border);
}

/* ==========================================
   Base Styles
   ========================================== */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

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

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ==========================================
   Typography
   ========================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

p {
    color: var(--color-text-secondary);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-accent-hover);
}

/* ==========================================
   Container
   ========================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ==========================================
   Header
   ========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(var(--color-bg), 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 100;
    transition: all var(--transition);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo-section {
    display: flex;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-accent), #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.lang-toggle,
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    position: relative;
}

.lang-toggle:hover,
.theme-toggle:hover {
    border-color: var(--color-accent);
    background: var(--color-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.lang-icon {
    width: 24px;
    height: 24px;
    display: block;
    position: absolute;
}

.lang-icon-en,
.lang-icon-hu {
    opacity: 1;
}

.theme-icon {
    width: 20px;
    height: 20px;
    display: block;
    background-color: var(--color-text);
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
}

html.dark .theme-icon {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z'/%3E%3C/svg%3E");
}

/* ==========================================
   Main Content
   ========================================== */
main {
    padding-top: 70px;
}

section {
    padding: var(--spacing-3xl) 0;
}

.section-header {
    margin-bottom: var(--spacing-3xl);
}

.section-header h2 {
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
}

.section-underline {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), transparent);
    border-radius: 2px;
}

.section-note {
    text-align: center;
    font-size: 1.125rem;
    margin-bottom: var(--spacing-2xl);
    color: var(--color-text-secondary);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl) 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
    align-items: center;
    width: 100%;
}

.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: glow 3s ease-in-out infinite;
    z-index: 0;
}

.hero-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 8%;
    border: 4px solid var(--color-accent);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    position: relative;
    z-index: 1;
    transition: all var(--transition);
}

.hero-image:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: var(--shadow-xl), 0 0 40px rgba(99, 102, 241, 0.3);
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.1;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
}

.hero-tagline {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent), #818cf8);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-secondary {
    background: var(--color-bg-secondary);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--color-accent);
    background: var(--color-bg);
    color: var(--color-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: var(--spacing-2xl);
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--color-border);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-accent), #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================
   About Section
   ========================================== */
.about {
    background: var(--color-bg-secondary);
}

.about-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    max-width: 800px;
    margin: 0 auto;
}

/* ==========================================
   Focus Section
   ========================================== */
.focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.focus-card {
    background: var(--color-bg-secondary);
    padding: var(--spacing-xl);
    border-radius: 16px;
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.focus-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.focus-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

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

.focus-card.in-progress {
    border-color: rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, var(--color-bg-secondary) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.focus-icon {
    font-size: 2.5rem;
}

.focus-card h3 {
    margin: 0;
    color: var(--color-text);
}

.progress-label {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-accent), #818cf8);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
}

.focus-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.focus-list li {
    color: var(--color-text-secondary);
    padding-left: 1.5rem;
    position: relative;
}

.focus-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: bold;
}

/* ==========================================
   Tech Section
   ========================================== */
.tech-section {
    background: var(--color-bg-secondary);
}

.tech-categories {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3xl);
}

.tech-category {
    position: relative;
}

.category-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
    padding-left: var(--spacing-md);
}

.category-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--color-accent), transparent);
    border-radius: 2px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--spacing-lg);
    padding-left: var(--spacing-md);
}

.tech-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: var(--spacing-lg);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    transition: all var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 140px;
    gap: var(--spacing-md);
}

.tech-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition);
}

.tech-item:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.tech-item:hover::before {
    opacity: 1;
}

.tech-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transition: transform var(--transition);
    filter: grayscale(0.3);
    position: relative;
    z-index: 1;
}

.tech-item:hover .tech-icon {
    transform: scale(1.15) rotate(5deg);
    filter: grayscale(0);
}

.tech-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

.tech-icon-dark {
    display: none;
}

html.dark .tech-icon-light {
    display: none;
}

html.dark .tech-icon-dark {
    display: block;
}

/* ==========================================
   Projects Section
   ========================================== */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.project-card {
    background: var(--color-bg-secondary);
    padding: var(--spacing-xl);
    border-radius: 16px;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.project-card:hover {
    border-color: var(--color-accent);
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.project-header {
    margin: 0;
}

.project-header h3 {
    margin: 0;
    color: var(--color-text);
    font-size: 1.25rem;
}

.project-description {
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.6;
}

.project-tech {
    font-size: 0.875rem;
    color: var(--color-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================
   Hobby Section
   ========================================== */
.hobby-section {
    background: var(--color-bg-secondary);
}

.hobby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-xl);
}

.hobby-card {
    background: var(--color-bg);
    padding: var(--spacing-xl);
    border-radius: 16px;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    position: relative;
    overflow: hidden;
}

.hobby-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition);
}

.hobby-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.hobby-card:hover::before {
    opacity: 1;
}

.hobby-icon {
    font-size: 3rem;
    position: relative;
    z-index: 1;
}

.hobby-card h3 {
    margin: 0;
    color: var(--color-text);
    font-size: 1.25rem;
    position: relative;
    z-index: 1;
}

.hobby-description {
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.hobby-tech {
    font-size: 0.875rem;
    color: var(--color-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 1;
}

.hobby-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* existing styles ... */
}

.hobby-link {
    display: inline-block;
    color: var(--color-accent);
    font-weight: 600;
    transition: all var(--transition);
    position: relative;
    z-index: 1;
    margin-top: auto; /* align button to bottom of the card */
    align-self: flex-start;
}

.hobby-link:hover {
    gap: var(--spacing-sm);
    transform: translateX(4px);
}

/* ==========================================
   Contact Section
   ========================================== */
.contact-section {
    background: var(--color-bg-secondary);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}

.contact-card {
    background: var(--color-bg);
    padding: var(--spacing-xl);
    border-radius: 16px;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition);
}

.contact-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.contact-card:hover::before {
    opacity: 1;
}

.contact-icon {
    font-size: 2.5rem;
    position: relative;
    z-index: 1;
}

.contact-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.contact-value {
    font-size: 1.125rem;
    color: var(--color-text);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    border-top: 1px solid var(--color-border);
    padding: var(--spacing-xl) 0;
    background: var(--color-bg-secondary);
    text-align: center;
}

.footer p {
    color: var(--color-text-secondary);
    margin: 0;
    font-size: 0.9375rem;
}

/* ==========================================
   Animations
   ========================================== */
@keyframes glow {
    0%, 100% {
        filter: blur(40px);
        opacity: 0.6;
    }
    50% {
        filter: blur(60px);
        opacity: 0.3;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: slideIn 0.6s ease-out;
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .hero-image {
        width: 200px;
        height: 200px;
    }

    .hero-image-glow {
        inset: -10px;
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-lg);
        border-top: none;
    }

    .tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

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

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

    .btn {
        width: 100%;
    }

    section {
        padding: var(--spacing-2xl) 0;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-xl: 1.5rem;
        --spacing-2xl: 2rem;
        --spacing-3xl: 2.5rem;
    }

    .navbar {
        height: 60px;
    }

    main {
        padding-top: 60px;
    }

    .hero {
        min-height: calc(100vh - 60px);
    }

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

    .hero-image {
        width: 150px;
        height: 150px;
    }

    .tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }

    .stat-item {
        flex: 1;
    }

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