/* ========================================
   CSS Variables & Reset
   ======================================== */
:root {
    --primary: #0066ff;
    --primary-dark: #0052cc;
    --primary-light: #e3f2fd;
    --secondary: #00d4ff;
    --accent: #ff6b35;
    --success: #00c853;
    --dark: #0d1117;
    --dark-secondary: #161b22;
    --dark-tertiary: #21262d;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --border: #30363d;
    --bg: #0d1117;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   Utility Classes
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hidden {
    display: none;
}

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

.section-header h2 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

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

/* ========================================
   Header & Navigation
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.navbar {
    padding: 1rem 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 2.5px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

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

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

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

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    padding-top: 120px;
    padding-bottom: 80px;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.05) 0%, rgba(0, 212, 255, 0.05) 100%);
    border-bottom: 1px solid var(--border);
}

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

.hero-text h1 {
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.3);
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 102, 255, 0.4);
}

.cta-primary:active {
    transform: translateY(0);
}

.hero-social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.hero-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(0, 102, 255, 0.1);
    border: 1px solid rgba(0, 102, 255, 0.3);
    border-radius: 8px;
    color: var(--primary);
    transition: var(--transition);
}

.hero-social-links a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-4px);
}

.hero-social-links svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

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

.hero-img {
    max-width: 300px;
    height: auto;
    border-radius: 12px;
    filter: drop-shadow(0 20px 40px rgba(0, 102, 255, 0.2));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ========================================
   Tools Section
   ======================================== */
.tools-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #1a3a52 0%, #0d2d52 50%, #1a244d 100%);
    border-bottom: 1px solid var(--border);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: var(--dark-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 102, 255, 0.2);
}

.tool-header {
    height: 160px;
    background: #8ea3e8;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.tool-icon {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    transition: var(--transition);
}

.tool-header.tool-icon-svg {
    font-size: 4rem;
    color: var(--primary);
}

.tool-header svg {
    width: 120px;
    height: 120px;
}

.tool-card:hover .tool-icon {
    transform: scale(1.1) rotate(3deg);
}

.tool-body {
    flex: 1;
    padding: 1.5rem;
    position: relative;
}

.tool-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.tool-body h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
}

.tool-body p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.tool-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

.tool-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition);
}

.tool-btn:hover {
    background: var(--primary-dark);
    transform: translateX(4px);
}

/* ========================================
   Notes Section
   ======================================== */
.notes-section {
    padding: 80px 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.note-card {
    background: var(--dark-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.note-card:hover {
    border-color: var(--secondary);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.15);
}

.note-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.note-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.note-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex: 1;
    line-height: 1.6;
}

.note-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--secondary), #00b8d4);
    color: var(--dark);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition);
}

.note-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

/* ========================================
   Contact Section
   ======================================== */
.contact-section {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.05) 0%, rgba(0, 212, 255, 0.05) 100%);
    border-bottom: 1px solid var(--border);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--dark-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-info {
    background: var(--dark-tertiary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.info-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item h4 {
    font-size: 0.95rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-item a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.info-item a:hover {
    color: var(--secondary);
}

.info-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--dark-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-4px);
}

.social-links svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* ========================================
   Popup
   ======================================== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

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

.popup-content {
    background: var(--dark-tertiary);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: slideIn 0.3s ease;
}

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

.checkmark-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--success), #00c853);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    margin: 0 auto 1rem;
}

.popup-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.popup-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.popup-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.popup-btn:hover {
    background: var(--primary-dark);
}

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

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

/* ========================================
   Floating Action Button
   ======================================== */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #ff8c42);
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
    transition: var(--transition);
    z-index: 100;
}

.fab:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 12px 32px rgba(255, 107, 53, 0.4);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--dark-secondary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-links.active {
        max-height: 300px;
        padding: 1rem 0;
    }

    .nav-links li {
        padding: 0;
    }

    .nav-links a {
        display: block;
        padding: 1rem 2rem;
        color: var(--text-secondary);
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

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

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

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

    .fab {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .hero-section,
    .tools-section,
    .notes-section,
    .contact-section {
        padding: 60px 0;
    }

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

    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 0;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .hero-text h1 {
        font-size: 1.5rem;
    }

    .cta-primary {
        width: 100%;
        justify-content: center;
    }

    .tool-card,
    .note-card {
        padding: 1.5rem;
    }

    .hero-section,
    .tools-section,
    .notes-section,
    .contact-section {
        padding: 40px 0;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    header,
    footer,
    .fab {
        display: none;
    }
}

/* ========================================
   Accessibility
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-color-scheme: light) {
    :root {
        --dark: #ffffff;
        --dark-secondary: #f6f8fa;
        --dark-tertiary: #eaeef2;
        --text-primary: #24292f;
        --text-secondary: #57606a;
        --border: #d0d7de;
        --bg: #ffffff;
    }

    body {
        color: var(--text-primary);
    }
}
