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

:root {
    --primary-bg: #1a1a1a;
    --secondary-bg: #ffffff;
    --text-primary: #ffffff;
    --text-secondary: #333333;
    --nav-bg: rgba(0, 0, 0, 0.3);
    --card-bg: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

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

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    z-index: 1000;
    padding: 1rem 2rem;
    transition: background 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
}

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

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.95rem;
    font-weight: 400;
}

.nav-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 60%;
}

.icon {
    font-size: 1rem;
}

.arrow {
    font-size: 0.7rem;
    margin-left: 0.2rem;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(50, 50, 50, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 200px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.3s ease;
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 100vh;
    width: 100%;
    background-color: #000;
    background-image: url('assets/Black-hole-a-region-of-spacetime.jpg');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    overflow: hidden;
}

@supports (height: 100svh) {
    .hero {
        height: 100svh;
        min-height: 100svh;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 300;
    text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.8);
    overflow: visible;
    border-right: 3px solid var(--text-primary);
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 0.15em;
    font-family: 'Georgia', serif;
    font-style: italic;
    line-height: 1.4;
    animation: blink-caret 0.75s step-end infinite;
}

.hero-title-line {
    display: inline;
}

.hero-title-break {
    display: none;
}

.hero-title-space {
    display: inline;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--text-primary);
    }
}

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

.hero-content {
    animation: fadeInUp 1s ease;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) rotate(270deg);
    color: var(--text-primary);
    animation: bounce 2s infinite;
    z-index: 1;
}

.chevron {
    font-size: 2rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) rotate(270deg) translateY(0);
    }
    40% {
        transform: translateX(-50%) rotate(270deg) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) rotate(270deg) translateY(-5px);
    }
}

/* About Section */
.about-section {
    background: #ffffff;
    padding: 6rem 2rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content {
    animation: fadeInLeft 1s ease;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.greeting {
    font-size: 2rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.name {
    font-size: 3.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    min-height: 40px;
}

.role-title {
    font-size: 1.8rem;
    color: #34495e;
    font-weight: 500;
    display: inline-block;
    min-width: 200px;
    width: 200px;
    text-align: left;
}

.role-title::after {
    content: '\200B';
}

.chiikawa-cursor {
    width: 24px;
    height: 24px;
    display: inline-block;
    object-fit: contain;
}

.skills-list {
    list-style: none;
    padding-left: 0;
}

.skills-list li {
    font-size: 1.3rem;
    color: #555;
    padding: 0.75rem 0;
    position: relative;
    padding-left: 2rem;
}

.skills-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: #667eea;
    font-size: 1.5rem;
}

.about-avatar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInRight 1s ease;
}

.about-avatar {
    display: flex;
    justify-content: center;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.about-avatar img {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 8px solid #f0f0f0;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 50%;
    color: #2c3e50;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background: #2c3e50;
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.social-icon svg {
    width: 24px;
    height: 24px;
}

.social-icon-xhs {
    width: 48px;
    height: 48px;
    padding: 0;
}

.xhs-icon-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* Education & Tech Section */
.education-tech-section {
    background: #f5f5f5;
    padding: 6rem 2rem 4rem;
    min-height: 100vh;
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 700;
}

/* Education Card */
.education-section {
    margin-bottom: 4rem;
}

.education-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 1000px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.education-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.edu-logo img {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.edu-content {
    text-align: center;
}

.edu-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 700;
}


.edu-degree {
    font-size: 1.2rem;
    color: #34495e;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.edu-date {
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.edu-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: #4a4a4a;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.edu-button:hover {
    background: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Tech Stacks */
.tech-category {
    margin-bottom: 3rem;
}

.category-title {
    font-size: 1.8rem;
    color: #34495e;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 600;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tech-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.tech-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.tech-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.tech-name {
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 500;
    margin: 0;
}

/* Work Experiences Section */
.work-experiences-section {
    background: #f5f5f5;
    padding: 6rem 2rem 4rem;
    min-height: 100vh;
}

.work-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 1100px;
    margin: 0 auto 2rem auto;
    transition: all 0.3s ease;
}

.work-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.work-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
}

.work-logo img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border-radius: inherit;
}

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

.work-company {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.work-location {
    color: #7f8c8d;
    margin-bottom: 1rem;
    font-style: italic;
}

.work-position {
    font-size: 1.3rem;
    color: #34495e;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.work-date {
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.work-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: #4a4a4a;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.work-button:hover {
    background: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer {
    background: #4a4a4a;
    color: #ffffff;
    padding: 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .about-container {
        max-width: 900px;
        gap: 3rem;
    }
    
    .section-container {
        max-width: 900px;
    }
}

@media (max-width: 992px) {
    .nav-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }

    .nav-menu {
        gap: 1.2rem;
        font-size: 0.9rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-title {
        font-size: 1.9rem;
        animation: blink-caret 0.75s step-end infinite;
    }
    
    .about-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        max-width: 700px;
    }
    
    .education-card,
    .work-card {
        grid-template-columns: 1fr;
        padding: 2.5rem;
    }
    
    .edu-logo,
    .work-logo {
        margin: 0 auto 1.5rem;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem 1.5rem;
    }

    .nav-container {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .nav-menu {
        gap: 1rem;
        font-size: 0.85rem;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    .nav-logo {
        font-size: 1.2rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.6rem;
        gap: 0.3rem;
    }
    
    .nav-icon {
        width: 16px;
        height: 16px;
    }
    
    .hero-title {
        font-size: 1.5rem;
        letter-spacing: 0.06em;
    }

    .hero-title {
        max-width: min(92vw, 720px);
        white-space: normal;
        overflow: visible;
        border-right: none;
        animation: none;
        text-align: center;
    }

    .hero-title-line {
        display: block;
    }

    .hero-title-line--second {
        white-space: nowrap;
        display: inline-block;
        max-width: 100%;
        font-size: clamp(1.05rem, 3.4vw, 1.35rem);
    }

    .hero-title-break {
        display: block;
    }

    .hero-title-space {
        display: none;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .about-section {
        padding: 4rem 1.5rem;
    }
    
    .about-container {
        gap: 2rem;
    }
    
    .greeting {
        font-size: 1.5rem;
    }
    
    .name {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .role-title {
        font-size: 1.2rem;
        min-width: 150px;
        width: 150px;
    }
    
    .chiikawa-cursor {
        width: 24px;
        height: 24px;
    }
    
    .skills-list li {
        font-size: 1rem;
        padding: 0.5rem 0;
        padding-left: 1.5rem;
    }
    
    .skills-list li::before {
        font-size: 1.2rem;
    }
    
    .about-avatar img {
        width: 280px;
        height: 280px;
        border: 6px solid #f0f0f0;
    }
    
    .social-links {
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .social-icon {
        width: 42px;
        height: 42px;
    }
    
    .social-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .social-icon-xhs {
        width: 42px;
        height: 42px;
    }
    
    .xhs-icon-img {
        width: 24px;
        height: 24px;
    }
    
    .education-tech-section,
    .work-experiences-section {
        padding: 7.5rem 1.5rem 3rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .category-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .education-card,
    .work-card {
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .edu-logo img,
    .work-logo img {
        width: 120px;
        height: 120px;
    }
    
    .edu-title,
    .work-company {
        font-size: 1.5rem;
    }
    
    .edu-degree,
    .work-position {
        font-size: 1.1rem;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1rem;
    }
    
    .tech-card {
        padding: 1.5rem;
    }
    
    .tech-icon {
        height: 60px;
    }
    
    .tech-icon img {
        width: 60px;
        height: 60px;
    }
    
    .tech-name {
        font-size: 1rem;
    }
    
    .footer {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.6rem 1rem;
    }

    .nav-container {
        flex-direction: column;
        align-items: center;
        gap: 0.6rem;
    }
    
    .nav-menu {
        gap: 0.5rem;
        font-size: 0.75rem;
        justify-content: center;
        width: 100%;
    }
    
    .nav-logo {
        font-size: 1rem;
    }
    
    .nav-link {
        padding: 0.3rem 0.4rem;
        flex-direction: column;
        gap: 0.2rem;
        font-size: 0.7rem;
    }
    
    .nav-icon {
        width: 14px;
        height: 14px;
    }
    
    .hero-title {
        font-size: 1.2rem;
        letter-spacing: 0.04em;
    }

    .hero-title-line--second {
        font-size: clamp(0.98rem, 4.2vw, 1.2rem);
    }
    
    .about-section {
        padding: 3rem 1rem;
    }
    
    .greeting {
        font-size: 1.3rem;
    }
    
    .name {
        font-size: 1.8rem;
    }
    
    .role-title {
        font-size: 1rem;
        min-width: 120px;
        width: 120px;
    }
    
    .chiikawa-cursor {
        width: 24px;
        height: 24px;
    }
    
    .skills-list li {
        font-size: 0.9rem;
    }
    
    .about-avatar img {
        width: 240px;
        height: 240px;
        border: 5px solid #f0f0f0;
    }
    
    .social-links {
        gap: 0.8rem;
    }
    
    .social-icon {
        width: 38px;
        height: 38px;
    }
    
    .social-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .social-icon-xhs {
        width: 38px;
        height: 38px;
    }
    
    .xhs-icon-img {
        width: 22px;
        height: 22px;
    }
    
    .education-tech-section,
    .work-experiences-section {
        padding: 7rem 1rem 2.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .category-title {
        font-size: 1.3rem;
    }
    
    .education-card,
    .work-card {
        padding: 1.2rem;
        border-radius: 10px;
    }
    
    .edu-logo img,
    .work-logo img {
        width: 100px;
        height: 100px;
    }
    
    .edu-title,
    .work-company {
        font-size: 1.3rem;
    }
    
    .edu-degree,
    .work-position {
        font-size: 1rem;
    }
    
    .edu-button,
    .work-button {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.8rem;
    }
    
    .tech-card {
        padding: 1.2rem;
    }
    
    .tech-icon {
        height: 50px;
    }
    
    .tech-icon img {
        width: 50px;
        height: 50px;
    }
    
    .tech-name {
        font-size: 0.9rem;
    }
    
    .footer {
        padding: 1.2rem;
    }
    
    .footer-content p {
        font-size: 0.85rem;
    }
}

/* Tablet Landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .about-container {
        gap: 3rem;
    }
    
    .about-avatar img {
        width: 350px;
        height: 350px;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}
